2 set(CTEST_SOURCE_DIRECTORY "@CMAKE_SOURCE_DIR@")
3 set(CTEST_BINARY_DIRECTORY "@CMAKE_BINARY_DIR@")
4 set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
5 set(CTEST_BUILD_NAME "@BUILDNAME@")
6 set(CTEST_SITE "@SITE@")
8 set(MODEL Experimental)
9 if(${CTEST_SCRIPT_ARG} MATCHES Nightly)
11 elseif(${CTEST_SCRIPT_ARG} MATCHES Continuous)
15 find_program(CTEST_HG_COMMAND NAMES hg)
16 set(CTEST_UPDATE_COMMAND "${CTEST_HG_COMMAND}")
18 ctest_start(${MODEL} ${CTEST_SOURCE_DIRECTORY} ${CTEST_BINARY_DIRECTORY})
20 ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
21 ctest_submit(PARTS Update Notes)
23 # to get CTEST_PROJECT_SUBPROJECTS definition:
24 include("${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake")
26 foreach(subproject ${CTEST_PROJECT_SUBPROJECTS})
28 message("Process ${subproject}")
30 set_property(GLOBAL PROPERTY SubProject ${subproject})
31 set_property(GLOBAL PROPERTY Label ${subproject})
33 ctest_configure(BUILD ${CTEST_BINARY_DIRECTORY} SOURCE ${CTEST_SOURCE_DIRECTORY} )
34 ctest_submit(PARTS Configure)
36 set(CTEST_BUILD_TARGET "Build${subproject}")
37 message("Build ${CTEST_BUILD_TARGET}")
38 ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
39 # builds target ${CTEST_BUILD_TARGET}
40 ctest_submit(PARTS Build)
42 ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "${subproject}" )
43 # runs only tests that have a LABELS property matching "${subproject}"
45 ctest_coverage(BUILD "${CTEST_BINARY_DIRECTORY}" LABELS "${subproject}" )
47 ctest_submit(PARTS Test)