diff options
author | marius vlad <marius.c.vlad@intel.com> | 2016-05-10 17:32:15 +0300 |
---|---|---|
committer | Marius Vlad <marius.c.vlad@intel.com> | 2016-05-11 18:22:05 +0300 |
commit | 701d8fdb363443453c4b613e9180f75ad36a7321 (patch) | |
tree | 200be95af16c037a99807fadcd764f736db482c1 /configure.ac | |
parent | 2d432fc5773df17f04283f4780dab161dd2e1c85 (diff) |
benchmarks/, overlay/, demos/, tools/, tests/: Add optional Werror.
v2: Initially added Werror by default. Make it optional so it doesn't
break android build and (potential) distros maintaing the package
(Hinted by Damien Lespiau).
--enable-werror will enable -Werror compiler flag.
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 05897820..11b1d46a 100644 --- a/configure.ac +++ b/configure.ac @@ -229,6 +229,11 @@ AC_ARG_ENABLE(debug, [Build tests without debug symbols]), [], [enable_debug=yes]) +AC_ARG_ENABLE(werror, + AS_HELP_STRING([--enable-werror], + [Fail on warnings]), + [], [enable_werror=no]) + if test "x$enable_debug" = xyes; then AS_COMPILER_FLAG([-g3], [DEBUG_CFLAGS="-g3"], [DEBUG_CFLAGS="-g"]) AS_COMPILER_FLAG([-Og], [DEBUG_CFLAGS+=" -Og -Wno-maybe-uninitialized"], # disable maybe-uninitialized due to false positives @@ -236,6 +241,10 @@ if test "x$enable_debug" = xyes; then AC_SUBST([DEBUG_CFLAGS]) fi +if test "x$enable_werror" = xyes; then + AS_COMPILER_FLAG([-Werror], [WERROR_CFLAGS="-Werror"]) +fi + # prevent relinking the world on every commit for developers AC_ARG_ENABLE(git-hash, AS_HELP_STRING([--disable-git-hash], @@ -313,6 +322,7 @@ echo " Overlay : X: ${enable_overlay_xlib}, Xv: ${enable_overla echo " x86-specific tools : ${build_x86}" echo "" echo " • API-Documentation : ${enable_gtk_doc}" +echo " • Fail on warnings: : ${enable_werror}" echo "" # vim: set ft=config ts=8 sw=8 tw=0 noet : |