From 1457c60e4b408a8ba0c561f25bf2fb096e1ec600 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Fri, 16 Nov 2018 18:43:03 +0100 Subject: [PATCH] Crucial fix to enable release mode again --- CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0999e0ce3..2dec13d80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ include(CheckCSourceCompiles) ## CMake options of Storm ## ############################################################# -option(STORM_DEVELOPER "Sets whether the development mode is used." ON) +option(STORM_DEVELOPER "Sets whether the development mode is used." OFF) option(STORM_ALLWARNINGS "Compile with even more warnings" OFF) option(STORM_USE_LTO "Sets whether link-time optimizations are enabled." ON) MARK_AS_ADVANCED(STORM_USE_LTO) @@ -89,7 +89,17 @@ endforeach() message(STATUS "Storm - CMake install dir: ${CMAKE_INSTALL_DIR}") # If the STORM_DEVELOPER option was turned on, by default we target a debug version, otherwise a release version. -set(CMAKE_BUILD_TYPE "DEBUG") +if (STORM_DEVELOPER) + if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "DEBUG") + endif() + add_definitions(-DSTORM_DEV) +else() + set(STORM_LOG_DISABLE_DEBUG ON) + if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "RELEASE") + endif() +endif() message(STATUS "Storm - Building ${CMAKE_BUILD_TYPE} version.")