summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortastytea2020-05-19 19:17:58 +0200
committertastytea2020-05-19 19:24:21 +0200
commit3909187f7af4bf19940db291fef6de6c5b8abd8b (patch)
tree1022cac4b447a85623b01592329ca89d003dff42
parent2ada3b406b73c37be89a33389fa762e9c40cb775 (diff)
downloadmastodonpp-3909187f7af4bf19940db291fef6de6c5b8abd8b.tar
mastodonpp-3909187f7af4bf19940db291fef6de6c5b8abd8b.tar.gz
mastodonpp-3909187f7af4bf19940db291fef6de6c5b8abd8b.zip
Add -DNDEBUG for non-debug builds.
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
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."