From: Denis Davydov Date: Mon, 29 May 2017 09:39:08 +0000 (+0200) Subject: add deal.IIFeatureConfig.cmake which contains detailed info about configured features X-Git-Tag: v9.0.0-rc1~1558^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=032cd7b409082fde0b148ba251686427d32f8fd2;p=dealii.git add deal.IIFeatureConfig.cmake which contains detailed info about configured features --- diff --git a/cmake/config/CMakeLists.txt b/cmake/config/CMakeLists.txt index 1d094e7c34..3169f0edba 100644 --- a/cmake/config/CMakeLists.txt +++ b/cmake/config/CMakeLists.txt @@ -159,6 +159,7 @@ CONFIGURE_FILE( INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}FeatureConfig.cmake DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR} COMPONENT library ) diff --git a/cmake/config/Config.cmake.in b/cmake/config/Config.cmake.in index 7900b9f630..45a02046ca 100644 --- a/cmake/config/Config.cmake.in +++ b/cmake/config/Config.cmake.in @@ -174,7 +174,7 @@ SET(DEAL_II_LIBRARIES "@CONFIG_LIBRARIES@") # -# Information about library targets +# Information about library targets and feature configuration # # The library targets file: @@ -188,3 +188,6 @@ SET(DEAL_II_TARGET_RELEASE "@CONFIG_TARGET_RELEASE@") # Full list of targets with "debug" and "optimized" keywords for easy use with TARGET_LINK_LIBRARIES: SET(DEAL_II_TARGET "@CONFIG_TARGET@") + +# The feature configuration file: +SET(DEAL_II_FEATURE_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}FeatureConfig.cmake") diff --git a/cmake/setup_write_config.cmake b/cmake/setup_write_config.cmake index daafa3e18b..61c2fe6b66 100644 --- a/cmake/setup_write_config.cmake +++ b/cmake/setup_write_config.cmake @@ -41,7 +41,8 @@ FILE(WRITE ${CMAKE_BINARY_DIR}/revision.log SET(_log_detailed "${CMAKE_BINARY_DIR}/detailed.log") SET(_log_summary "${CMAKE_BINARY_DIR}/summary.log") -FILE(REMOVE ${_log_detailed} ${_log_summary}) +SET(_log_feature "${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}FeatureConfig.cmake") +FILE(REMOVE ${_log_detailed} ${_log_summary} ${_log_feature}) MACRO(_both) # Write to both log files: @@ -56,6 +57,10 @@ MACRO(_summary) # Only write to summary.log: FILE(APPEND ${_log_summary} "${ARGN}") ENDMACRO() +MACRO(_featurelog) + # Only write to deal.IIFeatureConfig.cmake: + FILE(APPEND ${_log_feature} "${ARGN}") +ENDMACRO() _both( "### @@ -211,6 +216,7 @@ FOREACH(_feature ${_deal_ii_features_sorted}) # IF(NOT "${${_feature}_DIR}" STREQUAL "") _detailed("# ${_feature}_DIR = ${${_feature}_DIR}\n") + _featurelog("SET(DEAL_II_${_feature}_DIR \"${${_feature}_DIR}\")\n") ENDIF() # @@ -222,6 +228,7 @@ FOREACH(_feature ${_deal_ii_features_sorted}) ) IF(DEFINED ${_feature}_${_var2}) _detailed("# ${_feature}_${_var2} = ${${_feature}_${_var2}}\n") + _featurelog("SET(DEAL_II_${_feature}_${_var2} \"${${_feature}_${_var2}}\")\n") ENDIF() ENDFOREACH() ELSE() diff --git a/doc/news/changes/minor/20170529DenisDavydov b/doc/news/changes/minor/20170529DenisDavydov new file mode 100644 index 0000000000..6c719a66ce --- /dev/null +++ b/doc/news/changes/minor/20170529DenisDavydov @@ -0,0 +1,7 @@ +New: deal.IIFeatureConfig.cmake will contain detailed information about +feature configuration and is installed along with other CMake files. +These variables can be loaded by calling INCLUDE(${DEAL_II_FEATURE_CONFIG}). +This is useful when users want to link in additional parts of dependencies, not +required by deal.II (i.e. filesystem library from Boost package). +
+(Denis Davydov and Matthias Maier, 2017/05/29)