ENH: added for system information command line option
This commit is contained in:
parent
d97ae16bad
commit
dc7c6172b1
|
@ -0,0 +1,83 @@
|
|||
PROJECT(DumpInformation)
|
||||
|
||||
# first get the standard information for th platform
|
||||
INCLUDE_DIRECTORIES("This does not exists")
|
||||
GET_DIRECTORY_PROPERTY(incl INCLUDE_DIRECTORIES)
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${DumpInformation_BINARY_DIR};${DumpInformation_SOURCE_DIR}")
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/SystemInformation.in" "${RESULT_FILE}")
|
||||
|
||||
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"\n=================================================================\n")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"=== VARIABLES\n")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"=================================================================\n")
|
||||
GET_CMAKE_PROPERTY(res VARIABLES)
|
||||
FOREACH(var ${res})
|
||||
FILE(APPEND "${RESULT_FILE}" "${var} \"${${var}}\"\n")
|
||||
ENDFOREACH(var ${res})
|
||||
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"\n=================================================================\n")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"=== COMMANDS\n")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"=================================================================\n")
|
||||
GET_CMAKE_PROPERTY(res COMMANDS)
|
||||
FOREACH(var ${res})
|
||||
FILE(APPEND "${RESULT_FILE}" "${var}\n")
|
||||
ENDFOREACH(var ${res})
|
||||
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"\n=================================================================\n")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"=== MACROS\n")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"=================================================================\n")
|
||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "")
|
||||
GET_CMAKE_PROPERTY(res MACROS)
|
||||
FOREACH(var ${res})
|
||||
FILE(APPEND "${RESULT_FILE}" "${var}\n")
|
||||
ENDFOREACH(var ${res})
|
||||
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"\n=================================================================\n")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"=== OTHER\n")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"=================================================================\n")
|
||||
GET_DIRECTORY_PROPERTY(res INCLUDE_DIRECTORIES)
|
||||
FOREACH(var ${res})
|
||||
FILE(APPEND "${RESULT_FILE}" "INCLUDE_DIRECTORY: ${var}\n")
|
||||
ENDFOREACH(var)
|
||||
|
||||
GET_DIRECTORY_PROPERTY(res LINK_DIRECTORIES)
|
||||
FOREACH(var ${res})
|
||||
FILE(APPEND "${RESULT_FILE}" "LINK_DIRECTORIES: ${var}\n")
|
||||
ENDFOREACH(var)
|
||||
|
||||
GET_DIRECTORY_PROPERTY(res INCLUDE_REGULAR_EXPRESSION)
|
||||
FILE(APPEND "${RESULT_FILE}" "INCLUDE_REGULAR_EXPRESSION: ${res}\n")
|
||||
|
||||
# include other files if they are present, such as when run from within the
|
||||
# binary tree
|
||||
MACRO(DUMP_FILE THE_FILE)
|
||||
IF (EXISTS "${THE_FILE}")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"\n=================================================================\n")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"=== ${THE_FILE}\n")
|
||||
FILE(APPEND "${RESULT_FILE}"
|
||||
"=================================================================\n")
|
||||
|
||||
FILE(READ "${THE_FILE}" FILE_CONTENTS)
|
||||
FILE(APPEND "${RESULT_FILE}" "${FILE_CONTENTS}")
|
||||
ENDIF (EXISTS "${THE_FILE}")
|
||||
ENDMACRO(DUMP_FILE)
|
||||
|
||||
DUMP_FILE("../CMakeCache.txt")
|
||||
DUMP_FILE("../CMakeFiles/CMakeOutput.log")
|
||||
DUMP_FILE("../CMakeFiles/CMakeError.log")
|
||||
DUMP_FILE("../CMakeFiles/CMakeSystem.cmake")
|
|
@ -0,0 +1,91 @@
|
|||
========================================================
|
||||
=== MAIN VARIABLES
|
||||
========================================================
|
||||
CMAKE_STATIC_LIBRARY_PREFIX == "${CMAKE_STATIC_LIBRARY_PREFIX}"
|
||||
CMAKE_STATIC_LIBRARY_SUFFIX == "${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
CMAKE_SHARED_LIBRARY_PREFIX == "${CMAKE_SHARED_LIBRARY_PREFIX}"
|
||||
CMAKE_SHARED_LIBRARY_SUFFIX == "${CMAKE_SHARED_LIBRARY_SUFFIX}"
|
||||
CMAKE_SHARED_MODULE_PREFIX == "${CMAKE_SHARED_MODULE_PREFIX}"
|
||||
CMAKE_SHARED_MODULE_SUFFIX == "${CMAKE_SHARED_MODULE_SUFFIX}"
|
||||
|
||||
|
||||
CMAKE_DL_LIBS == "${CMAKE_DL_LIBS}"
|
||||
CMAKE_LIBRARY_PATH_FLAG == "${CMAKE_LIBRARY_PATH_FLAG}"
|
||||
CMAKE_LINK_LIBRARY_FLAG == "${CMAKE_LINK_LIBRARY_FLAG}"
|
||||
CMAKE_SKIP_RPATH == "${CMAKE_SKIP_RPATH}"
|
||||
CMAKE_SYSTEM_INFO_FILE == "${CMAKE_SYSTEM_INFO_FILE}"
|
||||
CMAKE_SYSTEM_NAME == "${CMAKE_SYSTEM_NAME}"
|
||||
CMAKE_SYSTEM == "${CMAKE_SYSTEM}"
|
||||
CMAKE_CXX_COMPILER == "${CMAKE_CXX_COMPILER}"
|
||||
CMAKE_C_COMPILER == "${CMAKE_C_COMPILER}"
|
||||
CMAKE_COMPILER_IS_GNUCC == "${CMAKE_COMPILER_IS_GNUCC}"
|
||||
CMAKE_COMPILER_IS_GNUCXX == "${CMAKE_COMPILER_IS_GNUCXX}"
|
||||
|
||||
// C shared library flag
|
||||
CMAKE_SHARED_LIBRARY_C_FLAGS == "${CMAKE_SHARED_LIBRARY_C_FLAGS}"
|
||||
CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS == "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}"
|
||||
CMAKE_SHARED_LIBRARY_LINK_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_FLAGS}"
|
||||
CMAKE_SHARED_LIBRARY_RUNTIME_FLAG == "${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG}"
|
||||
CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP == "${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP}"
|
||||
CMAKE_SHARED_LIBRARY_LINK_STATIC_C_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_STATIC_C_FLAGS}"
|
||||
CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_C_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_C_FLAGS}"
|
||||
|
||||
// C shared module flags
|
||||
CMAKE_SHARED_MODULE_C_FLAGS == "${CMAKE_SHARED_MODULE_C_FLAGS}"
|
||||
CMAKE_SHARED_MODULE_CREATE_C_FLAGS == "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}"
|
||||
CMAKE_SHARED_MODULE_RUNTIME_FLAG == "${CMAKE_SHARED_MODULE_RUNTIME_FLAG}"
|
||||
CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP == "${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP}"
|
||||
CMAKE_SHARED_MODULE_LINK_STATIC_C_FLAGS == "${CMAKE_SHARED_MODULE_LINK_STATIC_C_FLAGS}"
|
||||
CMAKE_SHARED_MODULE_LINK_DYNAMIC_C_FLAGS == "${CMAKE_SHARED_MODULE_LINK_DYNAMIC_C_FLAGS}"
|
||||
|
||||
// C exe flags
|
||||
CMAKE_EXE_LINK_STATIC_C_FLAGS == "${CMAKE_EXE_LINK_STATIC_C_FLAGS}"
|
||||
CMAKE_EXE_LINK_DYNAMIC_C_FLAGS == "${CMAKE_EXE_LINK_DYNAMIC_C_FLAGS}"
|
||||
|
||||
// CXX shared library flags
|
||||
CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}"
|
||||
CMAKE_SHARED_LIBRARY_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
|
||||
CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}"
|
||||
CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG == "${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG}"
|
||||
CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP == "${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP}"
|
||||
CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS}"
|
||||
CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS}"
|
||||
|
||||
// CXX shared module flags
|
||||
CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS == "${CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS}"
|
||||
CMAKE_SHARED_MODULE_CXX_FLAGS == "${CMAKE_SHARED_MODULE_CXX_FLAGS}"
|
||||
CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG == "${CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG}"
|
||||
CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP == "${CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP}"
|
||||
CMAKE_SHARED_MODULE_LINK_STATIC_CXX_FLAGS == "${CMAKE_SHARED_MODULE_LINK_STATIC_CXX_FLAGS}"
|
||||
CMAKE_SHARED_MODULE_LINK_DYNAMIC_CXX_FLAGS == "${CMAKE_SHARED_MODULE_LINK_DYNAMIC_CXX_FLAGS}"
|
||||
|
||||
// CXX exe flags
|
||||
CMAKE_EXE_LINK_STATIC_CXX_FLAGS == "${CMAKE_EXE_LINK_STATIC_CXX_FLAGS}"
|
||||
CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS == "${CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS}"
|
||||
|
||||
CMAKE_USER_MAKE_RULES_OVERRIDE == "${CMAKE_USER_MAKE_RULES_OVERRIDE}"
|
||||
CMAKE_VERBOSE_MAKEFILE == "${CMAKE_VERBOSE_MAKEFILE}"
|
||||
CMAKE_BUILD_TYPE == "${CMAKE_BUILD_TYPE}"
|
||||
CMAKE_CXX_FLAGS == "${CMAKE_CXX_FLAGS}"
|
||||
CMAKE_CXX_FLAGS_DEBUG == "${CMAKE_CXX_FLAGS_DEBUG}"
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL == "${CMAKE_CXX_FLAGS_MINSIZEREL}"
|
||||
CMAKE_CXX_FLAGS_RELEASE == "${CMAKE_CXX_FLAGS_RELEASE}"
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO == "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
|
||||
|
||||
CMAKE_C_FLAGS == "${CMAKE_C_FLAGS}"
|
||||
CMAKE_C_FLAGS_DEBUG == "${CMAKE_C_FLAGS_DEBUG}"
|
||||
CMAKE_C_FLAGS_MINSIZEREL == "${CMAKE_C_FLAGS_MINSIZEREL}"
|
||||
CMAKE_C_FLAGS_RELEASE == "${CMAKE_C_FLAGS_RELEASE}"
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO == "${CMAKE_C_FLAGS_RELWITHDEBINFO}"
|
||||
|
||||
// build rules
|
||||
CMAKE_CXX_CREATE_SHARED_LIBRARY == "${CMAKE_CXX_CREATE_SHARED_LIBRARY}"
|
||||
CMAKE_CXX_CREATE_SHARED_MODULE == "${CMAKE_CXX_CREATE_SHARED_MODULE}"
|
||||
CMAKE_C_CREATE_SHARED_LIBRARY == "${CMAKE_C_CREATE_SHARED_LIBRARY}"
|
||||
CMAKE_C_CREATE_SHARED_MODULE == "${CMAKE_C_CREATE_SHARED_MODULE}"
|
||||
CMAKE_CXX_CREATE_STATIC_LIBRARY == "${CMAKE_CXX_CREATE_STATIC_LIBRARY}"
|
||||
CMAKE_C_CREATE_STATIC_LIBRARY == "${CMAKE_C_CREATE_STATIC_LIBRARY}"
|
||||
CMAKE_CXX_COMPILE_OBJECT == "${CMAKE_CXX_COMPILE_OBJECT}"
|
||||
CMAKE_C_COMPILE_OBJECT == "${CMAKE_C_COMPILE_OBJECT}"
|
||||
CMAKE_C_LINK_EXECUTABLE == "${CMAKE_C_LINK_EXECUTABLE}"
|
||||
CMAKE_CXX_LINK_EXECUTABLE == "${CMAKE_CXX_LINK_EXECUTABLE}"
|
Loading…
Reference in New Issue