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!
This commit is contained in:
natureh 510
2012-12-29 01:13:28 +01:00
parent 6c7490afe6
commit 89c3aeae94

View File

@@ -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}")