]> https://gitweb.dealii.org/ - dealii.git/commitdiff
made DEAL_II_BUILD_TYPE default for external libraries 1758/head
authoralberto sartori <alberto.sartori86@gmail.com>
Thu, 15 Oct 2015 20:34:57 +0000 (22:34 +0200)
committeralberto sartori <alberto.sartori86@gmail.com>
Fri, 16 Oct 2015 04:02:33 +0000 (06:02 +0200)
cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
cmake/macros/macro_deal_ii_invoke_autopilot.cmake

index 293727523f9bda5949d26d148fa090978af5cae1..23caad932d9006276266a565456b0d7f65829019 100644 (file)
@@ -37,17 +37,10 @@ MACRO(DEAL_II_INITIALIZE_CACHED_VARIABLES)
   ENDIF()
 
   #
-  # Set build type according to available libraries
+  # Set build type according to build type of deal.II
   #
-  IF(DEAL_II_BUILD_TYPE MATCHES "Debug")
-    SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING
-      "Choose the type of build, options are: Debug, Release"
-      )
-  ELSE()
-    SET(CMAKE_BUILD_TYPE "Release" CACHE STRING
-      "Choose the type of build, options are: Debug, Release"
-      )
-  ENDIF()
+  SET(CMAKE_BUILD_TYPE ${DEAL_II_BUILD_TYPE} CACHE STRING
+    "Choose the type of build, options are: Debug, Release, DebugRelease")
 
   #
   # Reset build type if unsupported, i.e. if it is not (case insensitively
@@ -57,11 +50,6 @@ MACRO(DEAL_II_INITIALIZE_CACHED_VARIABLES)
 
   IF(NOT "${_cmake_build_type}" MATCHES "^(debug|release|debugrelease)$")
 
-    IF("${DEAL_II_BUILD_TYPE}" STREQUAL "DebugRelease")
-      SET(_new_build_type "Debug")
-    ELSE()
-      SET(_new_build_type "${DEAL_II_BUILD_TYPE}")
-    ENDIF()
 
     MESSAGE(
 "###
@@ -71,12 +59,12 @@ MACRO(DEAL_II_INITIALIZE_CACHED_VARIABLES)
 #  CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" unsupported by current installation!
 #  deal.II was built with CMAKE_BUILD_TYPE \"${DEAL_II_BUILD_TYPE}\".
 #
-#  CMAKE_BUILD_TYPE is forced to \"${_new_build_type}\".
+#  CMAKE_BUILD_TYPE is forced to \"${DEAL_II_BUILD_TYPE}\".
 #
 ###"
       )
-    SET(CMAKE_BUILD_TYPE "${_new_build_type}" CACHE STRING
-      "Choose the type of build, options are: Debug, Release"
+    SET(CMAKE_BUILD_TYPE ${DEAL_II_BUILD_TYPE} CACHE STRING
+      "Choose the type of build, options are: Debug, Release, DebugRelease"
       FORCE
       )
 
index 91781dcdcdcda0f13fc0bfe7f4eac8da2aefb9cd..594c6e6e8cc7a5f9a1b9db37c2ef75da44b00ecd 100644 (file)
 
 MACRO(DEAL_II_INVOKE_AUTOPILOT)
 
+  # Set CMAKE_BUILD_TYPE=Debug if both 
+  # Debug and Release mode are given
+  IF("${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease")
+    SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING
+      "Choose the type of build, options are: Debug, Release"
+      FORCE)
+  ENDIF()
+
+
   # Generator specific values:
   IF(CMAKE_GENERATOR MATCHES "Ninja")
     SET(_make_command "$ ninja")

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.