1 IF(NOT RUN_FROM_CTEST_OR_DART)
2 MESSAGE(FATAL_ERROR "Do not incldue CTestTargets.cmake directly")
3 ENDIF(NOT RUN_FROM_CTEST_OR_DART)
5 # make directories in the binary tree
6 FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/Temporary)
7 GET_FILENAME_COMPONENT(CMAKE_HOST_PATH ${CMAKE_COMMAND} PATH)
8 SET(CMAKE_TARGET_PATH ${EXECUTABLE_OUTPUT_PATH})
9 FIND_PROGRAM(CMAKE_CTEST_COMMAND ctest ${CMAKE_HOST_PATH} ${CMAKE_TARGET_PATH})
10 MARK_AS_ADVANCED(CMAKE_CTEST_COMMAND)
17 ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in
18 ${PROJECT_BINARY_DIR}/CTestConfiguration.ini )
19 ELSE(CTEST_NEW_FORMAT)
21 ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in
22 ${PROJECT_BINARY_DIR}/DartConfiguration.tcl )
23 ENDIF(CTEST_NEW_FORMAT)
28 # Custom targets to perform dashboard builds and submissions.
29 # These should NOT need to be modified from project to project.
33 IF(CMAKE_CONFIGURATION_TYPES)
34 # We need to pass the configuration type on the test command line.
35 SET(__conf_types -C "${CMAKE_CFG_INTDIR}")
36 ENDIF(CMAKE_CONFIGURATION_TYPES)
38 # Add convenience targets. Do this at most once in case of nested
40 DEFINE_PROPERTY(GLOBAL PROPERTY CTEST_TARGETS_ADDED
41 BRIEF_DOCS "Internal property used by CTestTargets module."
42 FULL_DOCS "Set by the CTestTargets module to track addition of testing targets."
44 GET_PROPERTY(_CTEST_TARGETS_ADDED GLOBAL PROPERTY CTEST_TARGETS_ADDED)
45 IF(NOT _CTEST_TARGETS_ADDED)
46 SET_PROPERTY(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
48 # For all generators add basic testing targets.
49 FOREACH(mode Experimental Nightly Continuous NightlyMemoryCheck)
50 ADD_CUSTOM_TARGET(${mode}
51 ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}
55 # For Makefile generators add more granular targets.
56 IF("${CMAKE_GENERATOR}" MATCHES Make)
57 # Make targets for Experimental builds
58 FOREACH(mode Nightly Experimental Continuous)
60 Start Update Configure Build Test Coverage MemCheck Submit
63 ADD_CUSTOM_TARGET(${mode}${testtype}
64 ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype}
68 ENDIF("${CMAKE_GENERATOR}" MATCHES Make)
69 ENDIF(NOT _CTEST_TARGETS_ADDED)