summaryrefslogtreecommitdiffstats
path: root/Modules/CTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-02-11 20:18:13 (GMT)
committerBrad King <brad.king@kitware.com>2009-02-11 20:18:13 (GMT)
commit0e067ad3d1866237a0b6fd8ba00326d3fb43deb6 (patch)
treef8163fc835a8f180d5b5b26caf77c0c10f6140b5 /Modules/CTest.cmake
parent7497fd575d0bd12e07a6145715a63ce8330a454f (diff)
downloadCMake-0e067ad3d1866237a0b6fd8ba00326d3fb43deb6.zip
CMake-0e067ad3d1866237a0b6fd8ba00326d3fb43deb6.tar.gz
CMake-0e067ad3d1866237a0b6fd8ba00326d3fb43deb6.tar.bz2
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.
Diffstat (limited to 'Modules/CTest.cmake')
-rw-r--r--Modules/CTest.cmake12
1 files changed, 12 insertions, 0 deletions
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 <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