[postgis-tickets] r16223 - Disable asserts in non-debug builds

Darafei komzpa at gmail.com
Fri Jan 5 03:43:58 PST 2018


Author: komzpa
Date: 2018-01-05 15:43:58 -0800 (Fri, 05 Jan 2018)
New Revision: 16223

Modified:
   trunk/.travis.yml
   trunk/configure.ac
Log:
Disable asserts in non-debug builds

Enable both debug and non-debug builds on travis.

Closes #3972
Closes https://github.com/postgis/postgis/pull/185



Modified: trunk/.travis.yml
===================================================================
--- trunk/.travis.yml	2018-01-05 15:22:57 UTC (rev 16222)
+++ trunk/.travis.yml	2018-01-05 23:43:58 UTC (rev 16223)
@@ -5,7 +5,7 @@
     - CFLAGS="-g -Og" MATRIX_EVAL="touch check-no-trailing-blanks"
     - CFLAGS="-g -O2 -fstack-protector -Wformat -Werror=format-security" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro"
     - CFLAGS="-g -O3 -mtune=generic -fno-omit-frame-pointer -Werror"
-    - CFLAGS="-g -O0 --coverage -fprofile-arcs -ftest-coverage" LDFLAGS="--coverage -fprofile-arcs -ftest-coverage"
+    - CFLAGS="-g -O0 --coverage -fprofile-arcs -ftest-coverage" LDFLAGS="--coverage -fprofile-arcs -ftest-coverage" CONFIGURE_FLAGS="--enable-debug"
 
 addons:
   postgresql: "9.6"
@@ -55,7 +55,7 @@
     - /home/travis/deb
 
 script:
-  - ./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" || cat config.log
+  - ./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" $CONFIGURE_FLAGS || cat config.log
   - make -j
   - chmod 755 /home/travis
   - logbt -- make check

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2018-01-05 15:22:57 UTC (rev 16222)
+++ trunk/configure.ac	2018-01-05 23:43:58 UTC (rev 16223)
@@ -1043,10 +1043,11 @@
 	[ENABLE_DEBUG=1], [ENABLE_DEBUG=0])
 
 if test $ENABLE_DEBUG -eq 1; then
-    AC_DEFINE_UNQUOTED([PARANOIA_LEVEL], [10], [Enable use of memory checks])
+    AC_DEFINE([PARANOIA_LEVEL], [10], [Enable use of memory checks])
     CFLAGS="$CFLAGS -g"
 else
-    AC_DEFINE_UNQUOTED([PARANOIA_LEVEL], [0], [Disable use of memory checks])
+    AC_DEFINE([PARANOIA_LEVEL], [0], [Disable use of memory checks])
+    AC_DEFINE([NDEBUG], [0], [Disable C asserts])
 fi
 
 



More information about the postgis-tickets mailing list