1 PROJECT(DumpInformation)
3 # first get the standard information for th platform
4 INCLUDE_DIRECTORIES("This does not exists")
5 GET_DIRECTORY_PROPERTY(incl INCLUDE_DIRECTORIES)
6 SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${DumpInformation_BINARY_DIR};${DumpInformation_SOURCE_DIR}")
8 CONFIGURE_FILE("${CMAKE_ROOT}/Modules/SystemInformation.in" "${RESULT_FILE}")
11 FILE(APPEND "${RESULT_FILE}"
12 "\n=================================================================\n")
13 FILE(APPEND "${RESULT_FILE}"
15 FILE(APPEND "${RESULT_FILE}"
16 "=================================================================\n")
17 GET_CMAKE_PROPERTY(res VARIABLES)
19 FILE(APPEND "${RESULT_FILE}" "${var} \"${${var}}\"\n")
20 ENDFOREACH(var ${res})
22 FILE(APPEND "${RESULT_FILE}"
23 "\n=================================================================\n")
24 FILE(APPEND "${RESULT_FILE}"
26 FILE(APPEND "${RESULT_FILE}"
27 "=================================================================\n")
28 GET_CMAKE_PROPERTY(res COMMANDS)
30 FILE(APPEND "${RESULT_FILE}" "${var}\n")
31 ENDFOREACH(var ${res})
33 FILE(APPEND "${RESULT_FILE}"
34 "\n=================================================================\n")
35 FILE(APPEND "${RESULT_FILE}"
37 FILE(APPEND "${RESULT_FILE}"
38 "=================================================================\n")
39 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "")
40 GET_CMAKE_PROPERTY(res MACROS)
42 FILE(APPEND "${RESULT_FILE}" "${var}\n")
43 ENDFOREACH(var ${res})
45 FILE(APPEND "${RESULT_FILE}"
46 "\n=================================================================\n")
47 FILE(APPEND "${RESULT_FILE}"
49 FILE(APPEND "${RESULT_FILE}"
50 "=================================================================\n")
51 GET_DIRECTORY_PROPERTY(res INCLUDE_DIRECTORIES)
53 FILE(APPEND "${RESULT_FILE}" "INCLUDE_DIRECTORY: ${var}\n")
56 GET_DIRECTORY_PROPERTY(res LINK_DIRECTORIES)
58 FILE(APPEND "${RESULT_FILE}" "LINK_DIRECTORIES: ${var}\n")
61 GET_DIRECTORY_PROPERTY(res INCLUDE_REGULAR_EXPRESSION)
62 FILE(APPEND "${RESULT_FILE}" "INCLUDE_REGULAR_EXPRESSION: ${res}\n")
64 # include other files if they are present, such as when run from within the
66 MACRO(DUMP_FILE THE_FILE)
67 IF (EXISTS "${THE_FILE}")
68 FILE(APPEND "${RESULT_FILE}"
69 "\n=================================================================\n")
70 FILE(APPEND "${RESULT_FILE}"
72 FILE(APPEND "${RESULT_FILE}"
73 "=================================================================\n")
75 FILE(READ "${THE_FILE}" FILE_CONTENTS LIMIT 50000)
76 FILE(APPEND "${RESULT_FILE}" "${FILE_CONTENTS}")
77 ENDIF (EXISTS "${THE_FILE}")
80 DUMP_FILE("../CMakeCache.txt")
81 DUMP_FILE("../CMakeFiles/CMakeOutput.log")
82 DUMP_FILE("../CMakeFiles/CMakeError.log")
83 DUMP_FILE("../CMakeFiles/CMakeSystem.cmake")
85 FOREACH (EXTRA_FILE ${EXTRA_DUMP_FILES})
86 DUMP_FILE("${EXTRA_FILE}")
87 ENDFOREACH (EXTRA_FILE)