2009-09-28 15:46:51 +00:00
|
|
|
|
|
|
|
#=============================================================================
|
2010-12-17 14:39:30 +00:00
|
|
|
# Copyright 2007-2010 Kitware, Inc.
|
2009-09-28 15:46:51 +00:00
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
2010-08-07 00:48:47 +00:00
|
|
|
# (To distribute this file outside of CMake, substitute the full
|
2009-09-28 15:46:51 +00:00
|
|
|
# License text for the above reference.)
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
cmake_minimum_required(VERSION ${CMAKE_VERSION})
|
|
|
|
project(DumpInformation)
|
2007-02-26 18:40:56 +00:00
|
|
|
|
|
|
|
# first get the standard information for th platform
|
2012-08-13 17:47:32 +00: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 18:40:56 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
configure_file("${CMAKE_ROOT}/Modules/SystemInformation.in" "${RESULT_FILE}")
|
2007-02-26 18:40:56 +00:00
|
|
|
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"\n=================================================================\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"=== VARIABLES\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"=================================================================\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
get_cmake_property(res VARIABLES)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND "${RESULT_FILE}" "${var} \"${${var}}\"\n")
|
2012-08-13 17:50:14 +00:00
|
|
|
endforeach()
|
2007-02-26 18:40:56 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"\n=================================================================\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"=== COMMANDS\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"=================================================================\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
get_cmake_property(res COMMANDS)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND "${RESULT_FILE}" "${var}\n")
|
2012-08-13 17:50:14 +00:00
|
|
|
endforeach()
|
2007-02-26 18:40:56 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"\n=================================================================\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"=== MACROS\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"=================================================================\n")
|
2012-08-13 17:47:32 +00: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 17:50:14 +00:00
|
|
|
endforeach()
|
2007-02-26 18:40:56 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"\n=================================================================\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"=== OTHER\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"=================================================================\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
get_directory_property(res INCLUDE_DIRECTORIES)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND "${RESULT_FILE}" "INCLUDE_DIRECTORY: ${var}\n")
|
2012-08-13 17:50:14 +00:00
|
|
|
endforeach()
|
2007-02-26 18:40:56 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
get_directory_property(res LINK_DIRECTORIES)
|
|
|
|
foreach(var ${res})
|
|
|
|
file(APPEND "${RESULT_FILE}" "LINK_DIRECTORIES: ${var}\n")
|
2012-08-13 17:50:14 +00:00
|
|
|
endforeach()
|
2007-02-26 18:40:56 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
get_directory_property(res INCLUDE_REGULAR_EXPRESSION)
|
|
|
|
file(APPEND "${RESULT_FILE}" "INCLUDE_REGULAR_EXPRESSION: ${res}\n")
|
2007-02-26 18:40:56 +00:00
|
|
|
|
|
|
|
# include other files if they are present, such as when run from within the
|
|
|
|
# binary tree
|
2012-08-13 17:47:32 +00:00
|
|
|
macro(DUMP_FILE THE_FILE)
|
|
|
|
if (EXISTS "${THE_FILE}")
|
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"\n=================================================================\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"=== ${THE_FILE}\n")
|
2012-08-13 17:47:32 +00:00
|
|
|
file(APPEND "${RESULT_FILE}"
|
2007-02-26 18:40:56 +00:00
|
|
|
"=================================================================\n")
|
2012-08-13 17:42:58 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
file(READ "${THE_FILE}" FILE_CONTENTS LIMIT 50000)
|
|
|
|
file(APPEND "${RESULT_FILE}" "${FILE_CONTENTS}")
|
2012-08-13 17:50:14 +00:00
|
|
|
endif ()
|
|
|
|
endmacro()
|
2007-02-26 18:40:56 +00:00
|
|
|
|
|
|
|
DUMP_FILE("../CMakeCache.txt")
|
|
|
|
DUMP_FILE("../CMakeFiles/CMakeOutput.log")
|
|
|
|
DUMP_FILE("../CMakeFiles/CMakeError.log")
|
|
|
|
DUMP_FILE("../CMakeFiles/CMakeSystem.cmake")
|
2007-02-27 14:43:34 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
foreach (EXTRA_FILE ${EXTRA_DUMP_FILES})
|
2007-02-27 14:43:34 +00:00
|
|
|
DUMP_FILE("${EXTRA_FILE}")
|
2012-08-13 17:50:14 +00:00
|
|
|
endforeach ()
|
2007-02-27 14:43:34 +00:00
|
|
|
|