From: Eric Haszlakiewicz Date: Fri, 6 Dec 2019 04:18:59 +0000 (-0500) Subject: Undefine NDEBUG for tests - cmake version. See issue #501. X-Git-Tag: json-c-0.14-20200419~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0819a55ffb4caacd2f4a116ba33c64d048a4f4b6;p=thirdparty%2Fjson-c.git Undefine NDEBUG for tests - cmake version. See issue #501. --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d4520170..72679db5 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() +