From 4c20e54119a1b212528ca52048fdb267dd224c43 Mon Sep 17 00:00:00 2001 From: Hleb Valoshka <375gnu@gmail.com> Date: Tue, 20 Aug 2019 10:16:27 +0300 Subject: [PATCH] [cmake] define required macros for debug builds --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09751db3..f4f6ce37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,7 +273,9 @@ if(APPLE) endif() string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type_lc) -if(NOT "${build_type_lc}" STREQUAL "debug") +if("${build_type_lc}" STREQUAL "debug") + add_definitions(-D_DEBUG -DDEBUG) +else() add_definitions(-DNO_DEBUG -DEIGEN_NO_DEBUG) endif()