diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-08-21 10:37:20 +0200 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-08-21 10:37:20 +0200 |
commit | 57254cdd05981a6d2c035f868316bbca2c5495f3 (patch) | |
tree | aceef5912ed948f336f666c98810d66b85cbc0cf /configure.ac | |
parent | 0b276f80f14959ff3e5c2ab04f816cd83f86dc7c (diff) |
configure: add option --enable-werror
Adds the compiler flag -Werror to fail on warnings.
Useful for CI runs.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 71a4f799..4e357a31 100644 --- a/configure.ac +++ b/configure.ac @@ -295,6 +295,9 @@ then ]) fi +AC_ARG_ENABLE([werror], [AS_HELP_STRING([--enable-werror], [Treat warnings as errors (default: warnings are not errors)])], [enable_werror="$enableval"], [enable_werror=no]) +AS_IF([test "x$enable_werror" = "xyes"], [AM_CFLAGS="$AM_CFLAGS -Werror"]) +AC_SUBST([AM_CFLAGS]) # Bail out on errors. # ---------------------------------------------------------------------- |