]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Always define _DEBUG for debug builds
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 29 Jul 2015 09:30:49 +0000 (19:30 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 29 Jul 2015 09:30:49 +0000 (19:30 +1000)
CMakeLists.txt

index d2e7c31024a892c9b0805f410b588c75dbc9130e..e4d09aaba7971f77077e3889566c755fec5b53bc 100644 (file)
@@ -46,10 +46,11 @@ endif()
 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
 
 # Enable Debug by default, can be changed with -D CMAKE_BUILD_TYPE=Release
-if(CMAKE_BUILD_TYPE STREQUAL "")
+if(NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE Debug)
+endif()
+if(CMAKE_BUILD_TYPE MATCHES Debug)
     add_definitions(-D_DEBUG=1)
-else()
 endif()
 
 find_package(OpenGL REQUIRED)