From: maier Date: Sun, 10 Mar 2013 09:11:30 +0000 (+0000) Subject: CMake: Bugfix: Switch keywords "debug" and "optimized" to "general" if only on type... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bbe62595aab406ed948ebb049d0a37c2a1f6901;p=dealii-svn.git CMake: Bugfix: Switch keywords "debug" and "optimized" to "general" if only on type of library is built so that linking is possible with arbitrary user build types git-svn-id: https://svn.dealii.org/trunk@28845 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/config/CMakeLists.txt b/deal.II/cmake/config/CMakeLists.txt index a7b65eaa7d..b427bd153b 100644 --- a/deal.II/cmake/config/CMakeLists.txt +++ b/deal.II/cmake/config/CMakeLists.txt @@ -55,10 +55,15 @@ STRIP_FLAG(CMAKE_CXX_FLAGS "-Wno-deprecated-declarations") # FOREACH(_build ${DEAL_II_BUILD_TYPES}) - IF(_build MATCHES DEBUG) - SET(_keyword "debug") + + IF(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease") + SET(_keyword "general") ELSE() - SET(_keyword "optimized") + IF(_build MATCHES DEBUG) + SET(_keyword "debug") + ELSE() + SET(_keyword "optimized") + ENDIF() ENDIF() SET(CONFIG_LIBRARIES_${_build} @@ -66,18 +71,14 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES}) ${DEAL_II_EXTERNAL_LIBRARIES} ${DEAL_II_EXTERNAL_LIBRARIES_${_build}} ) - - IF(NOT "${CONFIG_LIBRARIES_${_build}}" STREQUAL "") - LIST(APPEND CONFIG_LIBRARIES - ${_keyword} - ${CONFIG_LIBRARIES_${_build}} - ) - ENDIF() + LIST(APPEND CONFIG_LIBRARIES + ${_keyword} + ${CONFIG_LIBRARIES_${_build}} + ) SET(CONFIG_TARGET_${_build} ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX} ) - LIST(APPEND CONFIG_TARGET ${_keyword} ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}