Skip to contentSkip to conversation

Add (default disabled) --enable-werror option to configure

PATCH In review Steffan Karger 2 participants 2 messages May 29, 2014 – Jun 1, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add (default disabled) --enable-werror option to configure

Useful for example during development or automated builds, to make the build error out if new warnings are introduced.

---
 configure.ac | 10 ++++++++++
 1 file changed, 10 insertions(+)
configure.ac +10 -0
index ea35d73..1073312 100644
@@ -244,6 +244,13 @@ AC_ARG_ENABLE(
 )
 
 AC_ARG_ENABLE(
+	[werror],
+	[AS_HELP_STRING([--enable-werror], [promote compiler warnings to errors, will cause builds to fail is the compiler issues warnings (debugging option) @<:@default=no@:>@])],
+	,
+	[enable_werror="no"]
+)
+
+AC_ARG_ENABLE(
 	[strict-options],
 	[AS_HELP_STRING([--enable-strict-options], [enable strict options check between peers (debugging option) @<:@default=no@:>@])],
 	,
@@ -1137,6 +1144,9 @@ fi
 if test "${enable_strict}" = "yes"; then
 	CFLAGS="${CFLAGS} -Wall -Wno-unused-parameter -Wno-unused-function"
 fi
+if test "${enable_werror}" = "yes"; then
+	CFLAGS="${CFLAGS} -Werror"
+fi
 
 if test "${WIN32}" = "yes"; then
 	test -z "${MAN2HTML}" && AC_MSG_ERROR([man2html is required for win32])
Signature · 1 line
1.9.1
#1 lore raw

ACK. Your patch has been applied to the master branch.

commit 51194ffd1983f67b204348686f0ea358f29fe550

Author: Steffan Karger
Date:   Thu May 29 12:39:07 2014 +0200
     Add (default disabled) --enable-werror option to configure

     Signed-off-by: Steffan Karger <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: http://article.gmane.org/gmane.network.openvpn.devel/8747
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering