STYLE: Nightly Version update
[cmake.git] / Tests / SystemInformation / CMakeLists.txt
blob76907b00d68b36d4c885af9941bca8ac93f16b21
1 PROJECT(DumpInformation)
3 INCLUDE_DIRECTORIES("This does not exists")
4 GET_DIRECTORY_PROPERTY(incl INCLUDE_DIRECTORIES)
5 SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${DumpInformation_BINARY_DIR};${DumpInformation_SOURCE_DIR}")
7 MESSAGE("To prevent CTest from stripping output, you have to display: CTEST_FULL_OUTPUT")
10 CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/SystemInformation.in 
11 ${DumpInformation_BINARY_DIR}/SystemInformation.out)
12 CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/DumpInformation.h.in 
13 ${DumpInformation_BINARY_DIR}/DumpInformation.h)
14 ADD_EXECUTABLE(DumpInformation DumpInformation.cxx)
16 MACRO(FOO args)
17   MESSAGE("Test macro")
18 ENDMACRO(FOO)
20 FOO(lala)
22 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "")
23 GET_CMAKE_PROPERTY(res VARIABLES)
24 FOREACH(var ${res})
25   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt 
26              "${var} \"${${var}}\"\n")
27 ENDFOREACH(var ${res})
29 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt "")
30 GET_CMAKE_PROPERTY(res COMMANDS)
31 FOREACH(var ${res})
32   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt 
33              "${var}\n")
34 ENDFOREACH(var ${res})
36 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "")
37 GET_CMAKE_PROPERTY(res MACROS)
38 FOREACH(var ${res})
39   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt 
40              "${var}\n")
41 ENDFOREACH(var ${res})
43 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt "")
44 GET_DIRECTORY_PROPERTY(res INCLUDE_DIRECTORIES)
45 FOREACH(var ${res})
46   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
47     "INCLUDE_DIRECTORY: ${var}\n")
48 ENDFOREACH(var)
50 GET_DIRECTORY_PROPERTY(res LINK_DIRECTORIES)
51 FOREACH(var ${res})
52   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
53     "LINK_DIRECTORIES: ${var}\n")
54 ENDFOREACH(var)
56 GET_DIRECTORY_PROPERTY(res INCLUDE_REGULAR_EXPRESSION)
57 FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
58   "INCLUDE_REGULAR_EXPRESSION: ${res}\n")