From d8cc498e403145141bf04273e12d4183ab3a5660 Mon Sep 17 00:00:00 2001 From: TimePath Date: Wed, 29 Jul 2015 19:30:49 +1000 Subject: [PATCH] Always define _DEBUG for debug builds --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 2.39.2