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
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(
"###
# 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
)
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")