Still more improvements to Report Summary
Final Report doesn't distinguish system settings Added ability to have 'sections' to group stuff Added value function to display options as ON / OFF / value / -undefined- Added sections System, Config, Libraries Added a bunch of data to System and Config. Moved some out of Libraries as appropriate.
This commit is contained in:
@@ -34,6 +34,7 @@ ENDIF()
|
||||
|
||||
set(PYSIDE_RCC_EXECUTABLE ${PYSIDE2_RCC_EXECUTABLE})
|
||||
set(PYSIDE_UIC_EXECUTABLE ${PYSIDE2_UIC_EXECUTABLE})
|
||||
set(PySideTools_VERSION 2)
|
||||
|
||||
if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE)
|
||||
set(PYSIDE_TOOLS_FOUND TRUE)
|
||||
|
||||
@@ -14,6 +14,7 @@ endif()
|
||||
|
||||
set(PYSIDE_RCC_EXECUTABLE ${PYSIDE6_RCC_EXECUTABLE})
|
||||
set(PYSIDE_UIC_EXECUTABLE ${PYSIDE6_UIC_EXECUTABLE})
|
||||
set(PySideTools_VERSION 6)
|
||||
|
||||
if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE)
|
||||
set(PYSIDE_TOOLS_FOUND TRUE)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
macro(PrintFinalReport)
|
||||
|
||||
# simple report line
|
||||
# name and value
|
||||
macro(simple)
|
||||
set(name ${ARGV0})
|
||||
set(value ${ARGV1})
|
||||
@@ -8,11 +8,23 @@ macro(PrintFinalReport)
|
||||
set(value "-undefined-")
|
||||
endif()
|
||||
string(APPEND name ": ")
|
||||
string(SUBSTRING ${name} 0 20 nameStr)
|
||||
string(SUBSTRING ${name} 0 28 nameStr)
|
||||
list(APPEND simpleLines "${nameStr} ${value}")
|
||||
endmacro()
|
||||
|
||||
# report line with conditional data
|
||||
# just a value
|
||||
macro(value)
|
||||
unset(val)
|
||||
set(name ${ARGV0})
|
||||
if(${name})
|
||||
set(val ${${name}}) # name has a value
|
||||
elseif(DEFINED ${name})
|
||||
set(val "OFF ") #!
|
||||
endif()
|
||||
simple(${name} ${val})
|
||||
endmacro()
|
||||
|
||||
# conditional data
|
||||
macro(conditional)
|
||||
set(name ${ARGV0})
|
||||
set(condition ${ARGV1})
|
||||
@@ -26,19 +38,77 @@ macro(PrintFinalReport)
|
||||
simple(${name} ${out})
|
||||
endmacro()
|
||||
|
||||
################ Report data ##################
|
||||
function(section_begin name)
|
||||
unset(simpleLines PARENT_SCOPE)
|
||||
message("\n ==============\n"
|
||||
" ${name}\n"
|
||||
" ==============\n")
|
||||
endfunction()
|
||||
|
||||
function(section_end)
|
||||
list(SORT simpleLines CASE INSENSITIVE)
|
||||
foreach(line ${simpleLines})
|
||||
message(STATUS ${line})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
############## System ####################
|
||||
|
||||
section_begin(System)
|
||||
|
||||
simple(BuildType ${CMAKE_BUILD_TYPE})
|
||||
simple(Compiler "${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
simple(Flags ${CMAKE_CXX_FLAGS})
|
||||
simple(Standard "Requires C++${CMAKE_CXX_STANDARD}")
|
||||
# Qt5 needs/sets PYTHON_CONFIG_SUFFIX regarding Shiboken
|
||||
value(CMAKE_VERSION)
|
||||
simple(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
simple(bindir ${CMAKE_INSTALL_BINDIR})
|
||||
simple(datadir ${CMAKE_INSTALL_DATADIR})
|
||||
simple(docdir ${CMAKE_INSTALL_DOCDIR})
|
||||
simple(includedir ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
simple(libdir ${CMAKE_INSTALL_LIBDIR})
|
||||
simple(Python "${Python3_VERSION} [${PYTHON_EXECUTABLE}] Suffix: [${PYTHON_CONFIG_SUFFIX}]")
|
||||
value(BLAS)
|
||||
|
||||
section_end()
|
||||
|
||||
############## Config ####################
|
||||
|
||||
section_begin(Config)
|
||||
|
||||
value(CMAKE_CXX_STANDARD)
|
||||
value(CMAKE_CXX_FLAGS)
|
||||
value(CMAKE_BUILD_TYPE)
|
||||
value(BUILD_TEST)
|
||||
value(FREECAD_USE_FREETYPE)
|
||||
value(FREECAD_USE_EXTERNAL_SMESH)
|
||||
value(BUILD_SMESH)
|
||||
value(BUILD_VR)
|
||||
value(CMAKE_PREFIX_PATH)
|
||||
value(FREECAD_QT_VERSION)
|
||||
value(PYTHON_EXECUTABLE)
|
||||
value(PYTHON_LIBRARY)
|
||||
value(FREECAD_CREATE_MAC_APP)
|
||||
value(FREECAD_USE_PYBIND11)
|
||||
value(FREECAD_USE_EXTERNAL_KDL)
|
||||
value(BUILD_FEM)
|
||||
value(BUILD_WEB)
|
||||
value(BUILD_GUI)
|
||||
value(BUILD_START)
|
||||
value(BUILD_TECHDRAW)
|
||||
value(CMAKE_INSTALL_PREFIX)
|
||||
value(USE_CUDA)
|
||||
value(USE_OPENCV)
|
||||
value(FREECAD_LIBPACK_USE)
|
||||
|
||||
section_end()
|
||||
|
||||
################ Libraries ##################
|
||||
|
||||
section_begin(Libraries)
|
||||
|
||||
# Qt5 needs/sets PYTHON_CONFIG_SUFFIX regarding Shiboken
|
||||
conditional(pybind11 pybind11_FOUND "not enabled" ${pybind11_VERSION})
|
||||
simple(Boost ${Boost_VERSION})
|
||||
simple(XercesC "${XercesC_VERSION} [${XercesC_LIBRARIES}] [${XercesC_INCLUDE_DIRS}]")
|
||||
simple(ZLIB "${ZLIB_VERSION_STRING}")
|
||||
simple(PyCXX "${PYCXX_VERSION} [${PYCXX_INCLUDE_DIR}]")
|
||||
simple(OCC "${OCC_VERSION_STRING} [${OCC_LIBRARY_DIR}] [${OCC_INCLUDE_DIR}]")
|
||||
simple(OCC_Libs "[${OCC_LIBRARIES}]")
|
||||
if(BUILD_SMESH)
|
||||
@@ -78,11 +148,11 @@ macro(PrintFinalReport)
|
||||
else()
|
||||
simple(QtWebKitWidgets "not needed")
|
||||
endif()
|
||||
conditional(Shiboken SHIBOKEN_FOUND "not found" "${SHIBOKEN_VERSION} Base: [${SHIBOKEN_BASEDIR}]")
|
||||
conditional(PySide PYSIDE_FOUND "not found" "${PYSIDE_VERSION} [${PYSIDE_INCLUDE_DIR}]")
|
||||
conditional(Shiboken Shiboken_FOUND "not found" "${SHIBOKEN_VERSION} Base: [${SHIBOKEN_BASEDIR}]")
|
||||
conditional(PySide PySide_FOUND "not found" "${PYSIDE_VERSION} [${PYSIDE_INCLUDE_DIR}]")
|
||||
conditional(PySideTools PYSIDE_TOOLS_FOUND
|
||||
"not found"
|
||||
"uic: [${PYSIDE_UIC_EXECUTABLE}] rcc: [${PYSIDE_RCC_EXECUTABLE}]"
|
||||
"v: ${PySideTools_VERSION} uic: [${PYSIDE_UIC_EXECUTABLE}] rcc: [${PYSIDE_RCC_EXECUTABLE}]"
|
||||
)
|
||||
if(FREECAD_USE_FREETYPE)
|
||||
conditional(Freetype FREETYPE_FOUND "not found" ${FREETYPE_VERSION_STRING})
|
||||
@@ -93,36 +163,22 @@ macro(PrintFinalReport)
|
||||
simple(OpenGLU_Lib [${OPENGL_glu_LIBRARY}])
|
||||
simple(OpenGLU_Incl [${OPENGL_INCLUDE_DIR}])
|
||||
simple(Coin3D "${COIN3D_VERSION} [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
|
||||
simple(Pivy ${PIVY_VERSION})
|
||||
simple(pivy ${PIVY_VERSION})
|
||||
if (WIN32)
|
||||
#simple(SPNAV "not available yet for your OS") # FREECAD_USE_3DCONNEXION instead...
|
||||
else()
|
||||
conditional(SPNAV SPNAV_FOUND "not found" "[${SPNAV_LIBRARY}] [${SPNAV_INCLUDE_DIR}]")
|
||||
endif()
|
||||
conditional(Matplotlib MATPLOTLIB_FOUND "not found" ${MATPLOTLIB_VERSION})
|
||||
conditional(Matplotlib MATPLOTLIB_FOUND "not found" "${MATPLOTLIB_VERSION} PathDirs: ${MATPLOTLIB_PATH_DIRS}")
|
||||
if(BUILD_VR)
|
||||
conditional(Rift RIFT_FOUND "not found" ${Rift_VERSION})
|
||||
else()
|
||||
simple(Rift "not enabled (BUILD_VR)")
|
||||
endif()
|
||||
if(DOXYGEN_FOUND)
|
||||
simple(Doxygen ${DOXYGEN_VERSION})
|
||||
simple(Language ${DOXYGEN_LANGUAGE})
|
||||
conditional(Doxygen DOXYGEN_FOUND "not found" "${DOXYGEN_VERSION} Language: ${DOXYGEN_LANGUAGE}")
|
||||
conditional(Coin3D_DOC COIN3D_DOC_FOUND "not found" ${COIN3D_DOC_PATH})
|
||||
else()
|
||||
simple(Doxygen "not found")
|
||||
endif()
|
||||
conditional(Tests BUILD_TEST "OFF" "ON")
|
||||
conditional(PYCXX ${PYCXX_FOUND} "not found" "${PYCXX_VERSION} Incl: ${PYCXX_INCLUDE_DIR} Src:${PYCXX_SOURCE_DIR}")
|
||||
|
||||
############## End report data ####################
|
||||
|
||||
message(STATUS "\n==============\n"
|
||||
"Summary Report\n"
|
||||
"==============\n")
|
||||
|
||||
list(SORT simpleLines CASE INSENSITIVE)
|
||||
foreach(line ${simpleLines})
|
||||
message(STATUS ${line})
|
||||
endforeach()
|
||||
section_end()
|
||||
|
||||
endmacro()
|
||||
|
||||
Reference in New Issue
Block a user