From 0819a55ffb4caacd2f4a116ba33c64d048a4f4b6 Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Thu, 5 Dec 2019 23:18:59 -0500 Subject: [PATCH] Undefine NDEBUG for tests - cmake version. See issue #501. --- tests/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d452017..72679db 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -52,3 +52,8 @@ target_link_libraries( endforeach(TESTNAME) +# Make sure NDEBUG is always undefined for tests +if (UNIX OR MINGW OR CYGWIN) + list(APPEND CMAKE_C_FLAGS -UNDEBUG) +endif() +