From 6edc461c5746a03190728fa08dc4721dd3cfe79e Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 5 Jan 2020 12:44:38 +0100 Subject: [PATCH] Explicitly set NDEBUG for non-debug builds. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e64a888..f634f80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,11 @@ set(CMAKE_CXX_EXTENSIONS OFF) include(debug_flags) +# Disable debug log. +if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") + add_definitions("-DNDEBUG") +endif() + add_subdirectory(src) add_subdirectory(include)