From afcf0d291764cb24702635e6c039e4e511fe5556 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 15 Jul 2015 14:59:04 +0200 Subject: [PATCH] changed: declare check target before calling test hook in order for test hook to be able to add dependencies to the target --- cmake/Modules/OpmLibMain.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/Modules/OpmLibMain.cmake b/cmake/Modules/OpmLibMain.cmake index 5a4d22ec1..4f1a84a7b 100644 --- a/cmake/Modules/OpmLibMain.cmake +++ b/cmake/Modules/OpmLibMain.cmake @@ -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}