From fe117db525e09e599dbcea7335a84b9862b30fce Mon Sep 17 00:00:00 2001 From: Andrew Nelless Date: Thu, 27 Apr 2017 17:01:54 +0100 Subject: [PATCH] Force -DNDEBUG on non-Debug CMake builds --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 277c9490..f8292a12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,10 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON) set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") +if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions (-DNDEBUG) +endif() + # # Version #