Cmake build: Extend build info in Help>About

Added list of used cmake options and info about used compiler
This commit is contained in:
Kornel Benko 2020-03-25 13:48:16 +01:00
parent 426ca3a5d6
commit 3df9525a13

View File

@ -317,8 +317,6 @@ else()
endif()
set(VERSION_INFO "CMake Build")
# Try to get some informations from configure.ac
include(LyXPaths)
@ -1070,6 +1068,36 @@ endif()
include(${LYX_CMAKE_DIR}/ConfigureChecks.cmake)
configure_file(${LYX_CMAKE_DIR}/configCompiler.h.cmake ${TOP_BINARY_DIR}/configCompiler.h)
set(opts)
foreach(_option ${LYX_OPTIONS})
if(${_option}_show_message)
string(SUBSTRING "${_option} " 0 31 _var)
get_property(_prop CACHE ${_option} PROPERTY STRINGS)
list(FIND LYX_OPTION_STRINGS ${_option} _index)
if (${_index} GREATER -1)
set(_isset ${${_option}})
elseif(${_option})
set(_isset ON)
else()
set(_isset OFF)
endif()
string(SUBSTRING "${_isset} " 0 10 _val)
set(opts "${opts} ${_option}(${${_option}})")
endif()
endforeach()
set(VERSION_INFO "CMake Build")
set(VERSION_INFO "${VERSION_INFO}\\n Host name: ${CMAKE_HOST_SYSTEM_NAME}")
set(VERSION_INFO "${VERSION_INFO}\\n Host processor: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
set(VERSION_INFO "${VERSION_INFO}\\n Build flags: ${opts}")
set(VERSION_INFO "${VERSION_INFO}\\n C++ Compiler: ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER_VERSION})")
set(VERSION_INFO "${VERSION_INFO}\\n C++ Compiler flags: ${CMAKE_CXX_FLAGS}")
if (LYX_DEBUG)
set(VERSION_INFO "${VERSION_INFO}\\n C++ Compiler user flags: ${CMAKE_CXX_FLAGS_DEBUG}")
else()
set(VERSION_INFO "${VERSION_INFO}\\n C++ Compiler user flags: ${CMAKE_CXX_FLAGS_RELEASE}")
endif()
configure_file(${LYX_CMAKE_DIR}/config.h.cmake ${TOP_BINARY_DIR}/config.h)
if(QTVERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*")