[PATCH wayland 1/2] build: Add an --enable-fatal-warnings configure option

Bryce Harrington bryce at osg.samsung.com
Wed Feb 17 06:14:52 UTC 2016


On Fri, Jan 15, 2016 at 01:33:52PM -0600, Derek Foreman wrote:
> New --enable-fatal-warnings ./configure option that just adds -Werror
> to GCC_CFLAGS
> 
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>

Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

> ---
>  configure.ac | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 48658cf..17c1fa3 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -47,8 +47,17 @@ LT_INIT
>  
>  PKG_PROG_PKG_CONFIG()
>  
> +AC_ARG_ENABLE([fatal-warnings],
> +	      AC_HELP_STRING([--enable-fatal-warnings],
> +			     [Build with -Werror]),
> +	      [enable_fatal_warnings=$enableval],
> +	      [enable_fatal_warnings=no])
> +AS_IF([test x"$enable_fatal_warnings" != "xno"], [
> +      WERROR_CFLAGS="-Werror"
> +])
> +
>  if test "x$GCC" = "xyes"; then
> -	GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
> +	GCC_CFLAGS="$WERROR_CFLAGS -Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
>  fi
>  AC_SUBST(GCC_CFLAGS)
>  
> -- 
> 2.7.0.rc3
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list