changed: declare check target before calling test hook

in order for test hook to be able to add dependencies to the target
This commit is contained in:
Arne Morten Kvarving
2015-07-15 14:59:04 +02:00
parent 72989ba383
commit afcf0d2917

View File

@@ -242,6 +242,14 @@ macro (cond_disable_test name)
endif ((NOT DEFINED HAVE_${name}) OR (NOT HAVE_${name}))
endmacro (cond_disable_test name)
# use this target to run all tests
add_custom_target (check
COMMAND ${CMAKE_CTEST_COMMAND}
DEPENDS test-suite
COMMENT "Checking if library is functional"
VERBATIM
)
# special processing for tests
if (COMMAND tests_hook)
tests_hook ()
@@ -253,14 +261,6 @@ if (BUILD_TESTING)
opm_compile_satellites (${project} tests "" "${tests_REGEXP}")
endif (BUILD_TESTING)
# use this target to run all tests
add_custom_target (check
COMMAND ${CMAKE_CTEST_COMMAND}
DEPENDS test-suite
COMMENT "Checking if library is functional"
VERBATIM
)
# use this target to check local git commits
add_custom_target(check-commits
COMMAND ${CMAKE_COMMAND}