From 89c3aeae94283ace2b2a570cf8db19453edbcdb0 Mon Sep 17 00:00:00 2001 From: natureh 510 Date: Sat, 29 Dec 2012 01:13:28 +0100 Subject: [PATCH] For anything than the Debug build, the toolchain now set the _DNDEBUG and NDEBUG symbols. They were not set by default before, which mean that all "assert" were still active even in Release builds! --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 976130136..73db4accc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,9 @@ string (TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE) if (UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG") add_definitions (-D_DEBUG) +else () + add_definitions (-DNDEBUG) + add_definitions (-D_DNDEBUG) endif () message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")