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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user