From: TimePath Date: Wed, 29 Jul 2015 09:30:49 +0000 (+1000) Subject: Always define _DEBUG for debug builds X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d8cc498e403145141bf04273e12d4183ab3a5660;p=xonotic%2Fnetradiant.git Always define _DEBUG for debug builds --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d2e7c310..e4d09aab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)