From 0e067ad3d1866237a0b6fd8ba00326d3fb43deb6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 11 Feb 2009 15:18:13 -0500 Subject: 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. --- Modules/CTest.cmake | 12 ++++++++++++ Modules/DartConfiguration.tcl.in | 2 ++ 2 files changed, 14 insertions(+) diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 952e18e..40ae7fd 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -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 --build-dir --output --source --language --") + SET(CTEST_LAUNCH_LINK "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name --build-dir --output --target-type --language --") + SET(CTEST_LAUNCH_CUSTOM "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name --build-dir --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 diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in index 3ff6a59..39760b4 100644 --- a/Modules/DartConfiguration.tcl.in +++ b/Modules/DartConfiguration.tcl.in @@ -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@ -- cgit v0.12