CMakeLists.txt 1.76 KB
Newer Older
1
SET(CMAKE_EXECUTABLE "${CMake_BIN_DIR}/cmake")
2
3


4
MACRO(AddCMakeTest TestName PreArgs)
5
6
  CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/${TestName}Test.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" @ONLY IMMEDIATE)
7
8
  ADD_TEST(CMake.${TestName} ${CMAKE_EXECUTABLE} ${PreArgs}
    -P "${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" ${ARGN})
9
10
ENDMACRO(AddCMakeTest)

11

12
AddCMakeTest(List "")
13
AddCMakeTest(VariableWatch "")
Alexander Neundorf's avatar
   
Alexander Neundorf committed
14
15
16
AddCMakeTest(Include "")
AddCMakeTest(FindBase "")
AddCMakeTest(Toolchain "")
17
AddCMakeTest(GetFilenameComponentRealpath "")
18
AddCMakeTest(Version "")
19
AddCMakeTest(Message "")
Brad King's avatar
Brad King committed
20
AddCMakeTest(File "")
21
AddCMakeTest(ConfigureFile "")
22
AddCMakeTest(SeparateArguments "")
Brad King's avatar
Brad King committed
23
AddCMakeTest(ImplicitLinkInfo "")
24
AddCMakeTest(ModuleNotices "")
25
AddCMakeTest(If "")
26
AddCMakeTest(String "")
27
28
AddCMakeTest(Math "")
AddCMakeTest(CMakeMinimumRequired "")
29
AddCMakeTest(CompilerIdVendor "")
30

31
32
33
34
if(HAVE_ELF_H)
  AddCMakeTest(ELF "")
endif()

35
36
37
38
39
SET(EndStuff_PreArgs
  "-Ddir:STRING=${CMAKE_CURRENT_BINARY_DIR}/EndStuffTest"
  )
AddCMakeTest(EndStuff "${EndStuff_PreArgs}")

40
41
42
43
SET(GetPrerequisites_PreArgs
  "-DCTEST_CONFIGURATION_TYPE:STRING=\\\${CTEST_CONFIGURATION_TYPE}"
  )
AddCMakeTest(GetPrerequisites "${GetPrerequisites_PreArgs}")
44
45
46
47
48
49

# Run CheckSourceTree as the very last test in the CMake/CTest/CPack test
# suite. It detects if any changes have been made to the CMake source tree
# by any previous configure, build or test steps.
#
if(do_cvs_tests)
50
  string(REPLACE "\\" "/" ENV_HOME "$ENV{HOME}")
51
  set(CheckSourceTree_PreArgs
52
    "-DCMake_BINARY_DIR:PATH=${CMake_BINARY_DIR}"
53
54
    "-DCMake_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}"
    "-DCVS_EXECUTABLE:STRING=${CVS_EXECUTABLE}"
55
    "-DHOME:STRING=${ENV_HOME}"
56
57
    )
  AddCMakeTest(CheckSourceTree "${CheckSourceTree_PreArgs}")
58
endif(do_cvs_tests)