From 3909187f7af4bf19940db291fef6de6c5b8abd8b Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 19 May 2020 19:17:58 +0200 Subject: [PATCH] Add -DNDEBUG for non-debug builds. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f562e4..fc9d79a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,11 @@ endif() set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.") option(BUILD_SHARED_LIBS "Build shared libraries." YES) +# Not every non-debug build type adds -DNDEBUG. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + add_compile_definitions(NDEBUG) +endif() + project(mastodonpp VERSION 0.5.4 DESCRIPTION "C++ wrapper for the Mastodon and Pleroma APIs."