Change in osmo-pcap[master]: configure.ac: Add --enable-werror flag

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Oct 8 11:41:52 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/11272


Change subject: configure.ac: Add --enable-werror flag
......................................................................

configure.ac: Add --enable-werror flag

Change-Id: I387a3365fb5b7340bf67fb945df434442924a4c7
---
M configure.ac
1 file changed, 18 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/72/11272/1

diff --git a/configure.ac b/configure.ac
index b370e0d..5032255 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,24 @@
 dnl checks for header files
 AC_HEADER_STDC
 
+AC_ARG_ENABLE(werror,
+	[AS_HELP_STRING(
+		[--enable-werror],
+		[Turn all compiler warnings into errors, with exceptions:
+		 a) deprecation (allow upstream to mark deprecation without breaking builds);
+		 b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds)
+		]
+	)],
+	[werror=$enableval], [werror="no"])
+if test x"$werror" = x"yes"
+then
+	WERROR_FLAGS="-Werror"
+	WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
+	WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
+	CFLAGS="$CFLAGS $WERROR_FLAGS"
+	CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
+fi
+
 AC_ARG_ENABLE([external_tests],
 		AC_HELP_STRING([--enable-external-tests],
 				[Include the VTY tests in make check [default=no]]),

-- 
To view, visit https://gerrit.osmocom.org/11272
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I387a3365fb5b7340bf67fb945df434442924a4c7
Gerrit-Change-Number: 11272
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181008/0e905042/attachment.htm>


More information about the gerrit-log mailing list