2016-09-27 22:01:08 +03:00
|
|
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
2009-09-28 19:46:51 +04:00
|
|
|
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
cmake_minimum_required(VERSION ${CMAKE_VERSION})
|
|
|
|
project(DumpInformation)
|
2007-02-26 21:40:56 +03:00
|
|
|
|
|
|
|
# first get the standard information for th platform
|
2012-08-13 21:47:32 +04:00
|
|
|
include_directories("This does not exists")
|
|
|
|
get_directory_property(incl INCLUDE_DIRECTORIES)
|
|
|
|
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${DumpInformation_BINARY_DIR};${DumpInformation_SOURCE_DIR}")
|
2007-02-26 21:40:56 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
configure_file("${CMAKE_ROOT}/Modules/SystemInformation.in" "${RESULT_FILE}")
|
2007-02-26 21:40:56 +03:00
|
|
|
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"\n=================================================================\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"=== VARIABLES\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"=================================================================\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
get_cmake_property(res VARIABLES)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND "${RESULT_FILE}" "${var} \"${${var}}\"\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach()
|
2007-02-26 21:40:56 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"\n=================================================================\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"=== COMMANDS\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"=================================================================\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
get_cmake_property(res COMMANDS)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND "${RESULT_FILE}" "${var}\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach()
|
2007-02-26 21:40:56 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"\n=================================================================\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"=== MACROS\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"=================================================================\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "")
|
|
|
|
get_cmake_property(res MACROS)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND "${RESULT_FILE}" "${var}\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach()
|
2007-02-26 21:40:56 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"\n=================================================================\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"=== OTHER\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"=================================================================\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
get_directory_property(res INCLUDE_DIRECTORIES)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND "${RESULT_FILE}" "INCLUDE_DIRECTORY: ${var}\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach()
|
2007-02-26 21:40:56 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
get_directory_property(res LINK_DIRECTORIES)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND "${RESULT_FILE}" "LINK_DIRECTORIES: ${var}\n")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach()
|
2007-02-26 21:40:56 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
get_directory_property(res INCLUDE_REGULAR_EXPRESSION)
|
|
|
|
file(APPEND "${RESULT_FILE}" "INCLUDE_REGULAR_EXPRESSION: ${res}\n")
|
2007-02-26 21:40:56 +03:00
|
|
|
|
|
|
|
# include other files if they are present, such as when run from within the
|
|
|
|
# binary tree
|
2012-08-13 21:47:32 +04:00
|
|
|
macro(DUMP_FILE THE_FILE)
|
|
|
|
if (EXISTS "${THE_FILE}")
|
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"\n=================================================================\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"=== ${THE_FILE}\n")
|
2012-08-13 21:47:32 +04:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 21:40:56 +03:00
|
|
|
"=================================================================\n")
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
file(READ "${THE_FILE}" FILE_CONTENTS LIMIT 50000)
|
|
|
|
file(APPEND "${RESULT_FILE}" "${FILE_CONTENTS}")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
|
|
|
endmacro()
|
2007-02-26 21:40:56 +03:00
|
|
|
|
|
|
|
DUMP_FILE("../CMakeCache.txt")
|
|
|
|
DUMP_FILE("../CMakeFiles/CMakeOutput.log")
|
|
|
|
DUMP_FILE("../CMakeFiles/CMakeError.log")
|
|
|
|
DUMP_FILE("../CMakeFiles/CMakeSystem.cmake")
|
2007-02-27 17:43:34 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
foreach (EXTRA_FILE ${EXTRA_DUMP_FILES})
|
2007-02-27 17:43:34 +03:00
|
|
|
DUMP_FILE("${EXTRA_FILE}")
|
2012-08-13 21:50:14 +04:00
|
|
|
endforeach ()
|
2007-02-27 17:43:34 +03:00
|
|
|
|