Fix dependencies between test programs and datafiles

Apparently, DEPENDS can only be used between file-level dependencies
and not target-level dependencies. add_dependencies must be used for
that.
This commit is contained in:
Roland Kaufmann 2013-02-20 13:23:27 +01:00
parent fa01a6fed1
commit e1488bbca7

View File

@ -48,10 +48,9 @@ macro (opm_compile_satellites opm satellite excl_all test_regexp)
endif (NOT (${excl_all} MATCHES "EXCLUDE_ALL"))
# if a set of datafiles has been setup, pull those in
add_custom_target (${satellite} ${_incl_all})
if (${satellite}_DATAFILES)
add_custom_target (${satellite} ${_incl_all} DEPENDS ${${satellite}_DATAFILES})
else (${satellite}_DATAFILES)
add_custom_target (${satellite} ${_incl_all})
add_dependencies (${satellite} ${${satellite}_DATAFILES})
endif (${satellite}_DATAFILES)
# compile each of these separately