STYLE: Nightly Date Stamp
[cmake.git] / Tests / SystemInformation / CMakeLists.txt
blobc4285758eb74eea56fe66f416bc6eb4c62dac6cb
1 cmake_minimum_required (VERSION 2.6)
2 PROJECT(SystemInformation)
4 INCLUDE_DIRECTORIES("This does not exists")
5 GET_DIRECTORY_PROPERTY(incl INCLUDE_DIRECTORIES)
6 SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${SystemInformation_BINARY_DIR};${SystemInformation_SOURCE_DIR}")
8 MESSAGE("To prevent CTest from stripping output, you have to display: CTEST_FULL_OUTPUT")
11 CONFIGURE_FILE(${SystemInformation_SOURCE_DIR}/SystemInformation.in 
12 ${SystemInformation_BINARY_DIR}/SystemInformation.out)
13 CONFIGURE_FILE(${SystemInformation_SOURCE_DIR}/DumpInformation.h.in 
14 ${SystemInformation_BINARY_DIR}/DumpInformation.h)
15 ADD_EXECUTABLE(SystemInformation DumpInformation.cxx)
17 MACRO(FOO args)
18   MESSAGE("Test macro")
19 ENDMACRO(FOO)
21 FOO(lala)
23 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "")
24 GET_CMAKE_PROPERTY(res VARIABLES)
25 FOREACH(var ${res})
26   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt 
27              "${var} \"${${var}}\"\n")
28 ENDFOREACH(var ${res})
30 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt "")
31 GET_CMAKE_PROPERTY(res COMMANDS)
32 FOREACH(var ${res})
33   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt 
34              "${var}\n")
35 ENDFOREACH(var ${res})
37 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "")
38 GET_CMAKE_PROPERTY(res MACROS)
39 FOREACH(var ${res})
40   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt 
41              "${var}\n")
42 ENDFOREACH(var ${res})
44 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt "")
45 GET_DIRECTORY_PROPERTY(res INCLUDE_DIRECTORIES)
46 FOREACH(var ${res})
47   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
48     "INCLUDE_DIRECTORY: ${var}\n")
49 ENDFOREACH(var)
51 GET_DIRECTORY_PROPERTY(res LINK_DIRECTORIES)
52 FOREACH(var ${res})
53   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
54     "LINK_DIRECTORIES: ${var}\n")
55 ENDFOREACH(var)
57 GET_DIRECTORY_PROPERTY(res INCLUDE_REGULAR_EXPRESSION)
58 FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
59   "INCLUDE_REGULAR_EXPRESSION: ${res}\n")