diff options
author | Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com> | 2012-10-15 18:34:01 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2012-10-16 19:27:59 (GMT) |
commit | d63eb0be203d82574a37383e63b609bc547869dd (patch) | |
tree | 69d6f21b313d1ff40c0946f1a5301187bcb4a794 /Modules/CTest.cmake | |
parent | 5ca5a09e06131579a8137d91366279a255afdcae (diff) | |
download | CMake-d63eb0be203d82574a37383e63b609bc547869dd.zip CMake-d63eb0be203d82574a37383e63b609bc547869dd.tar.gz CMake-d63eb0be203d82574a37383e63b609bc547869dd.tar.bz2 |
CTest: Ensure CTEST_USE_LAUNCHERS behaves nicely in Superbuild setup
When building a project relying on External projects, the launchers were
not used in subprojects built without testing enabled. This was preventing
errors and warnings associated with these subprojects from being
reported on the dashboard.
This commit allows enabling the launchers independently of the value of
"BUILD_TESTING" using one of these two approaches:
1) By setting both CTEST_USE_LAUNCHERS and the env variable
"CTEST_USE_LAUNCHERS_DEFAULT" to 1 in the ctest dashboard driver scripts.
2) By enabling the variable CTEST_USE_LAUNCHERS in the ctest dashboard
driver script and also by ensuring every external project passes the option
-DCMAKE_PROJECT_<projectname>_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake
Diffstat (limited to 'Modules/CTest.cmake')
-rw-r--r-- | Modules/CTest.cmake | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 1e2dd5c..562e248 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -73,6 +73,8 @@ function(GET_VS_VERSION_STRING generator var) set(${var} ${ver_string} PARENT_SCOPE) endfunction() +include(CTestUseLaunchers) + if(BUILD_TESTING) # Setup some auxilary macros macro(SET_IF_NOT_SET var val) @@ -243,18 +245,6 @@ if(BUILD_TESTING) set(DEFAULT_CTEST_CONFIGURATION_TYPE "Release") endif() - if(NOT "${CMAKE_GENERATOR}" MATCHES "Make") - set(CTEST_USE_LAUNCHERS 0) - endif() - if(CTEST_USE_LAUNCHERS) - set(CTEST_LAUNCH_COMPILE "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --") - set(CTEST_LAUNCH_LINK "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --") - set(CTEST_LAUNCH_CUSTOM "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OUTPUT> --") - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CTEST_LAUNCH_COMPILE}") - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}") - set_property(GLOBAL PROPERTY RULE_LAUNCH_CUSTOM "${CTEST_LAUNCH_CUSTOM}") - endif() - mark_as_advanced( BZRCOMMAND BZR_UPDATE_OPTIONS |