]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Make cmake and configure release flags consistent
authorAdam Stylinski <kungfujesus06@gmail.com>
Tue, 25 Jan 2022 05:16:37 +0000 (00:16 -0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 25 Jan 2022 11:17:37 +0000 (12:17 +0100)
CMake sufficiently appends -DNDEBUG to the preprocessor macros when not
compiling with debug symbols.  This turns off debug level assertions and
has some other side effects.  As such, we should equally append this
define to the configure scripts' CFLAGS.

configure

index 215d0f286f4e42e8eaffc2ab07914dcf9cc12d8b..e957aa0ba15ac51bf925dd1956bc10afb2076a06 100755 (executable)
--- a/configure
+++ b/configure
@@ -396,6 +396,9 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
   if test $debug -eq 1; then
     CFLAGS="${CFLAGS} -DZLIB_DEBUG"
     SFLAGS="${SFLAGS} -DZLIB_DEBUG"
+  else
+    CFLAGS="${CFLAGS} -DNDEBUG"
+    SFLAGS="${SFLAGS} -DNDEBUG"
   fi
   if test -z "$uname"; then
     uname=$((uname -s || echo unknown) 2>/dev/null)