build: use -Werror only in release builds
authorAlexander Kanavin <alexander.kanavin@intel.com>
Tue, 4 Feb 2014 15:02:49 +0000 (17:02 +0200)
committerAlexander Kanavin <alexander.kanavin@intel.com>
Tue, 4 Feb 2014 15:02:49 +0000 (17:02 +0200)
In testing it's often needed to comment out parts of tests to narrow down
the issue, and -Werror makes it very hard, due to 'unused variable' type
errors.

configure.ac

index 83d4866..8c39e9b 100644 (file)
@@ -174,7 +174,11 @@ AC_CHECK_HEADERS([string.h])
 GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -D_POSIX_C_SOURCE=\\\"200809L\\\" -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE"
 
 # Checks for typedefs, structures, and compiler characteristics.
-GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -Wall -Werror -DG_LOG_DOMAIN=\\\"gsignond\\\""
+GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -Wall -DG_LOG_DOMAIN=\\\"gsignond\\\""
+if test "x$enable_debug" = "xno" ; then
+    GSIGNOND_CFLAGS="$GSIGNOND_CFLAGS -Werror"
+fi
+
 # GSIGNOND_LIBS="$GSIGNOND_LIBS -lduma"
 
 # Checks for library functions.