blob: 76907b00d68b36d4c885af9941bca8ac93f16b21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
PROJECT(DumpInformation)
INCLUDE_DIRECTORIES("This does not exists")
GET_DIRECTORY_PROPERTY(incl INCLUDE_DIRECTORIES)
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${DumpInformation_BINARY_DIR};${DumpInformation_SOURCE_DIR}")
MESSAGE("To prevent CTest from stripping output, you have to display: CTEST_FULL_OUTPUT")
CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/SystemInformation.in
${DumpInformation_BINARY_DIR}/SystemInformation.out)
CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/DumpInformation.h.in
${DumpInformation_BINARY_DIR}/DumpInformation.h)
ADD_EXECUTABLE(DumpInformation DumpInformation.cxx)
MACRO(FOO args)
MESSAGE("Test macro")
ENDMACRO(FOO)
FOO(lala)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt "")
GET_CMAKE_PROPERTY(res VARIABLES)
FOREACH(var ${res})
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
"${var} \"${${var}}\"\n")
ENDFOREACH(var ${res})
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt "")
GET_CMAKE_PROPERTY(res COMMANDS)
FOREACH(var ${res})
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllCommands.txt
"${var}\n")
ENDFOREACH(var ${res})
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "")
GET_CMAKE_PROPERTY(res MACROS)
FOREACH(var ${res})
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt
"${var}\n")
ENDFOREACH(var ${res})
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt "")
GET_DIRECTORY_PROPERTY(res INCLUDE_DIRECTORIES)
FOREACH(var ${res})
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
"INCLUDE_DIRECTORY: ${var}\n")
ENDFOREACH(var)
GET_DIRECTORY_PROPERTY(res LINK_DIRECTORIES)
FOREACH(var ${res})
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
"LINK_DIRECTORIES: ${var}\n")
ENDFOREACH(var)
GET_DIRECTORY_PROPERTY(res INCLUDE_REGULAR_EXPRESSION)
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/OtherProperties.txt
"INCLUDE_REGULAR_EXPRESSION: ${res}\n")
|