From 82c753a14a1196e1c88dca6320e6d15e0f447e15 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Fri, 5 Jan 2018 23:43:58 +0000 Subject: [PATCH] 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 git-svn-id: http://svn.osgeo.org/postgis/trunk@16223 b70326c6-7e19-0410-871a-916f4a2858ee --- .travis.yml | 4 ++-- configure.ac | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 761355510..1dadf3c3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ env: - 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 @@ cache: - /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 diff --git a/configure.ac b/configure.ac index 872354a98..1a0483f85 100644 --- a/configure.ac +++ b/configure.ac @@ -1043,10 +1043,11 @@ AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [Enable debugging code a [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 -- 2.40.0