diff --git a/doc/xml/release.xml b/doc/xml/release.xml
index e36be1931..2854d1e4f 100644
--- a/doc/xml/release.xml
+++ b/doc/xml/release.xml
@@ -78,6 +78,10 @@
Add cfgOptionTest()
and update cfgOption()
calls that are better implemented as cfgOptionTest()
.
+
+
+ Build with -DNDEBUG by default but disable for testing.
+
diff --git a/src/Makefile b/src/Makefile
index e19eccb86..b57ae39a0 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -22,11 +22,14 @@ CWARN = -Wfatal-errors -Wall -Wextra -Wwrite-strings -Wno-clobbered -Wswitch-enu
# Automatically generate Perl compile options for the local system
CPERL = `perl -MExtUtils::Embed -e ccopts`
+# Debug options
+CDEBUG = -DNDEBUG
+
# Extra compile options to be set by caller
CEXTRA =
# Concatenate options for easy usage
-CFLAGS = $(CINCLUDE) $(CSTD) $(COPT) $(CWARN) $(CPERL) $(CEXTRA)
+CFLAGS = $(CINCLUDE) $(CSTD) $(COPT) $(CWARN) $(CPERL) $(CDEBUG) $(CEXTRA)
####################################################################################################################################
# Link options
diff --git a/test/test.pl b/test/test.pl
index 81760b419..2492bbcbc 100755
--- a/test/test.pl
+++ b/test/test.pl
@@ -522,7 +522,7 @@ eval
}
executeTest(
- "docker exec -i test-build make --silent --directory ${strBuildPath} CEXTRA=-g",
+ "docker exec -i test-build make --silent --directory ${strBuildPath} CEXTRA=-g CDEBUG=",
{bShowOutputAsync => $bLogDetail});
executeTest(