Make sure that datafiles are copied when tests are made

That way, if someone runs `make test`, the datafiles will be there if
the testing programs are there, and the tests won't fail (because of
that).
This commit is contained in:
Roland Kaufmann 2013-02-19 23:28:44 +01:00
parent abf418f2bd
commit ebc0be26aa

View File

@ -39,11 +39,19 @@
# opm_compile_satellites (opm-core test "" "^test_([^/]*)$")
#
macro (opm_compile_satellites opm satellite excl_all test_regexp)
# if we are going to build the tests always, then make sure that
# the datafiles are present too
if (NOT (${excl_all} MATCHES "EXCLUDE_ALL"))
set (_incl_all "ALL")
else (NOT (${excl_all} MATCHES "EXCLUDE_ALL"))
set (_incl_all "")
endif (NOT (${excl_all} MATCHES "EXCLUDE_ALL"))
# if a set of datafiles has been setup, pull those in
if (${satellite}_DATAFILES)
add_custom_target (${satellite} DEPENDS ${${satellite}_DATAFILES})
add_custom_target (${satellite} ${_incl_all} DEPENDS ${${satellite}_DATAFILES})
else (${satellite}_DATAFILES)
add_custom_target (${satellite})
add_custom_target (${satellite} ${_incl_all})
endif (${satellite}_DATAFILES)
# compile each of these separately