Useful for example during development or automated builds, to make the
build error out if new warnings are introduced.
Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1401359947-31144-1-git-send-email-steffan@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8747
Signed-off-by: Gert Doering <gert@greenie.muc.de>
... | ... |
@@ -244,6 +244,13 @@ AC_ARG_ENABLE( |
244 | 244 |
) |
245 | 245 |
|
246 | 246 |
AC_ARG_ENABLE( |
247 |
+ [werror], |
|
248 |
+ [AS_HELP_STRING([--enable-werror], [promote compiler warnings to errors, will cause builds to fail is the compiler issues warnings (debugging option) @<:@default=no@:>@])], |
|
249 |
+ , |
|
250 |
+ [enable_werror="no"] |
|
251 |
+) |
|
252 |
+ |
|
253 |
+AC_ARG_ENABLE( |
|
247 | 254 |
[strict-options], |
248 | 255 |
[AS_HELP_STRING([--enable-strict-options], [enable strict options check between peers (debugging option) @<:@default=no@:>@])], |
249 | 256 |
, |
... | ... |
@@ -1137,6 +1144,9 @@ fi |
1137 | 1137 |
if test "${enable_strict}" = "yes"; then |
1138 | 1138 |
CFLAGS="${CFLAGS} -Wall -Wno-unused-parameter -Wno-unused-function" |
1139 | 1139 |
fi |
1140 |
+if test "${enable_werror}" = "yes"; then |
|
1141 |
+ CFLAGS="${CFLAGS} -Werror" |
|
1142 |
+fi |
|
1140 | 1143 |
|
1141 | 1144 |
if test "${WIN32}" = "yes"; then |
1142 | 1145 |
test -z "${MAN2HTML}" && AC_MSG_ERROR([man2html is required for win32]) |