ENH: Create include(CTest) launcher interface

This defines a new CTest configuration variable CTEST_USE_LAUNCHERS.
When set to true it puts 'ctest --launch' in RULE_LAUNCH_* properties
and enables the CTest configuration option 'UseLaunchers'.  Currently
this works only for Makefile generators.
This commit is contained in:
Brad King 2009-02-11 15:18:13 -05:00
parent 7497fd575d
commit 0e067ad3d1
2 changed files with 14 additions and 0 deletions

View File

@ -190,6 +190,18 @@ IF(BUILD_TESTING)
# set the build command
BUILD_COMMAND(MAKECOMMAND ${MAKEPROGRAM} )
IF(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
SET(CTEST_USE_LAUNCHERS 0)
ENDIF(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
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(CTEST_USE_LAUNCHERS)
MARK_AS_ADVANCED(
COVERAGE_COMMAND
CVSCOMMAND

View File

@ -60,3 +60,5 @@ CoverageCommand: @COVERAGE_COMMAND@
# process will be summaily terminated.
# Currently set to 25 minutes
TimeOut: @DART_TESTING_TIMEOUT@
UseLaunchers: @CTEST_USE_LAUNCHERS@