[lxc-devel] [lxc/master] configure: add --disable-werror

jerome-pouiller on Github lxc-bot at linuxcontainers.org
Sun Sep 4 07:38:43 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 396 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160904/ff247786/attachment.bin>
-------------- next part --------------
From d288f679545a25501baf837a390931f5a3ba3bc2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= <jezz at sysmic.org>
Date: Sun, 4 Sep 2016 09:35:44 +0200
Subject: [PATCH] configure: add --disable-werror

-Werror may break builds on some scenarios with trivialities
(especially during developments).
---
 configure.ac | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 39e313a..0103579 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,6 +152,11 @@ if test "x$with_systemdsystemunitdir" != "xno"; then
   AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir])
 fi
 
+AC_ARG_ENABLE([werror],
+	[AC_HELP_STRING([--disable-werror],
+	[do not treat warnings as errors])],
+	[], [enable_werror=yes])
+
 # Allow enabling deprecated executables
 AC_ARG_ENABLE([deprecated],
 	[AC_HELP_STRING([--enable-deprecated],
@@ -630,7 +635,10 @@ AC_PROG_SED
 LXC_CHECK_TLS
 
 if test "x$GCC" = "xyes"; then
-	CFLAGS="$CFLAGS -Wall -Werror"
+	CFLAGS="$CFLAGS -Wall"
+	if test "x$enable_werror" = "xyes"; then
+		CFLAGS="$CFLAGS -Werror"
+	fi
 fi
 
 # Files requiring some variable expansion


More information about the lxc-devel mailing list