summarylogtreecommitdiffstats
path: root/cmake-build-type.patch
blob: c3173a2216f9c203c470bfd3bc22e5b5ca80c9ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8ff498d0..270e4aa4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,18 +5,8 @@ CMAKE_POLICY(SET CMP0054 NEW)
 CMAKE_POLICY(SET CMP0053 NEW)
 PROJECT("Luminance HDR")
 
-string(TOLOWER ${CMAKE_BUILD_TYPE} LOWERCASE_CMAKE_BUILD_TYPE)
-if(LOWERCASE_CMAKE_BUILD_TYPE MATCHES "^(debug|release|relwithdebinfo|minsizerel)$")
-    message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-else()
-    message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}\n"
-        "CMAKE_BUILD_TYPE should be one of:\nDebug, Release, RelWithDebInfo, MinSizeRel")
-endif()
-
-if(LOWERCASE_CMAKE_BUILD_TYPE MATCHES "^(release|minsizerel)$")
-    message(STATUS "Adding definitions: -DQT_NO_DEBUG_OUTPUT")
-    add_definitions("-DQT_NO_DEBUG_OUTPUT")
-endif()
+message(STATUS "Adding definitions: -DQT_NO_DEBUG_OUTPUT -DNDEBUG")
+add_definitions(-DQT_NO_DEBUG_OUTPUT -DNDEBUG)
 
 # assume built-in pthreads on MacOS
 IF(APPLE)