From 0bbe62595aab406ed948ebb049d0a37c2a1f6901 Mon Sep 17 00:00:00 2001 From: maier Date: Sun, 10 Mar 2013 09:11:30 +0000 Subject: [PATCH] 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 --- deal.II/cmake/config/CMakeLists.txt | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) 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} -- 2.39.5