1 SET(CMAKE_EXECUTABLE "${EXECUTABLE_OUTPUT_PATH}/cmake")
4 MACRO(AddCMakeTest TestName PreArgs)
5 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/${TestName}Test.cmake.in"
6 "${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" @ONLY IMMEDIATE)
7 ADD_TEST(CMake.${TestName} ${CMAKE_EXECUTABLE} ${PreArgs}
8 -P "${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" ${ARGN})
13 AddCMakeTest(VariableWatch "")
14 AddCMakeTest(Include "")
15 AddCMakeTest(FindBase "")
16 AddCMakeTest(Toolchain "")
17 AddCMakeTest(GetFilenameComponentRealpath "")
18 AddCMakeTest(Version "")
19 AddCMakeTest(Message "")
21 AddCMakeTest(SeparateArguments "")
22 AddCMakeTest(ImplicitLinkInfo "")
24 SET(GetPrerequisites_PreArgs
25 "-DCTEST_CONFIGURATION_TYPE:STRING=\\\${CTEST_CONFIGURATION_TYPE}"
27 AddCMakeTest(GetPrerequisites "${GetPrerequisites_PreArgs}")
29 # Run CheckSourceTree as the very last test in the CMake/CTest/CPack test
30 # suite. It detects if any changes have been made to the CMake source tree
31 # by any previous configure, build or test steps.
34 set(CheckSourceTree_PreArgs
35 "-DCMake_BINARY_DIR:PATH=${CMake_BINARY_DIR}"
36 "-DCMake_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}"
37 "-DCVS_EXECUTABLE:STRING=${CVS_EXECUTABLE}"
39 AddCMakeTest(CheckSourceTree "${CheckSourceTree_PreArgs}")