From: Matthias Maier Date: Mon, 23 Mar 2015 12:01:32 +0000 (+0100) Subject: CMake: Also export feature versions in deal.IIConfig.cmake and Make.global_options X-Git-Tag: v8.3.0-rc1~363^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0821450dd8a017813f2a520cc6b009c3a6a66c7;p=dealii.git CMake: Also export feature versions in deal.IIConfig.cmake and Make.global_options With this commit the version string of enabled features (with version information) is also exported to deal.IIConfig.cmake and Make.global_options --- diff --git a/cmake/config/CMakeLists.txt b/cmake/config/CMakeLists.txt index b599339d9f..96971a4ea7 100644 --- a/cmake/config/CMakeLists.txt +++ b/cmake/config/CMakeLists.txt @@ -103,10 +103,9 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES}) SET(_type "STATIC") ENDIF() - SET(_reldir "\${DEAL_II_LIBRARY_RELDIR}") - + SET(_name "${CMAKE_${_type}_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}${CMAKE_${_type}_LIBRARY_SUFFIX}") SET(CONFIG_LIBRARIES_${_build} - "\${DEAL_II_PATH}/${_reldir}/${CMAKE_${_type}_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}${CMAKE_${_type}_LIBRARY_SUFFIX}" + "\${DEAL_II_PATH}/${DEAL_II_LIBRARY_RELDIR}/${_name}" ${DEAL_II_LIBRARIES_${_build}} ${DEAL_II_LIBRARIES} ) @@ -205,7 +204,7 @@ SET(_files ) SET(_makefiles ${CMAKE_BINARY_DIR}/${DEAL_II_SHARE_RELDIR}/Make.global_options - ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_SHARE_RELDIR}/Make.global_options + ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options ) FOREACH(_file ${_files} ${_makefiles}) FILE(APPEND ${_file} "\n\n#\n# Feature configuration:\n#\n\n") @@ -214,12 +213,25 @@ ENDFOREACH() GET_CMAKE_PROPERTY(res VARIABLES) FOREACH(var ${res}) IF(var MATCHES "DEAL_II_WITH") + STRING(REPLACE "DEAL_II_WITH_" "" _name ${var}) + FOREACH(_file ${_files}) FILE(APPEND ${_file} "SET(${var} ${${var}})\n") + IF(${var} AND NOT "${${_name}_VERSION}" STREQUAL "") + FILE(APPEND ${_file} + "SET(DEAL_II_${_name}_VERSION \"${${_name}_VERSION}\")\n" + ) + ENDIF() ENDFOREACH() + FOREACH(_file ${_makefiles}) IF(${var}) FILE(APPEND ${_file} "${var} = true\n") + IF(NOT "${${_name}_VERSION}" STREQUAL "") + FILE(APPEND ${_file} + "DEAL_II_${_name}_VERSION = ${${_name}_VERSION}\n" + ) + ENDIF() ELSE() FILE(APPEND ${_file} "${var} = false\n") ENDIF()