build: Add --disable-Werror
We enable a bunch of compiler flags to trip common errors during development. While this is very useful while hacking on Clutter, it makes the life of people building Clutter on automated build systems much harder; thus, we should have a configuration option to opt out of the -Werror business. GNOME has pretty much standardised on `--disable-Werror`, so we should crib that configure option.
This commit is contained in:
33
configure.ac
33
configure.ac
@@ -955,18 +955,27 @@ MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS
|
||||
-Wcast-align
|
||||
-Wuninitialized
|
||||
-Wno-strict-aliasing
|
||||
-Wshadow
|
||||
-Werror=logical-op
|
||||
-Werror=pointer-arith
|
||||
-Werror=missing-declarations
|
||||
-Werror=redundant-decls
|
||||
-Werror=empty-body
|
||||
-Werror=format
|
||||
-Werror=format-security
|
||||
-Werror=format-nonliteral
|
||||
-Werror=init-self
|
||||
-Werror=declaration-after-statement
|
||||
-Werror=vla"
|
||||
-Wshadow"
|
||||
|
||||
AC_ARG_ENABLE([Werror],
|
||||
[AS_HELP_STRING([--disable-Werror], [Removes -Werror from compiler flags])],
|
||||
[],
|
||||
[enable_Werror=yes])
|
||||
|
||||
AS_IF([test "x$enable_Werror" = xyes], [
|
||||
MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS
|
||||
-Werror=logical-op
|
||||
-Werror=pointer-arith
|
||||
-Werror=missing-declarations
|
||||
-Werror=redundant-decls
|
||||
-Werror=empty-body
|
||||
-Werror=format
|
||||
-Werror=format-security
|
||||
-Werror=format-nonliteral
|
||||
-Werror=init-self
|
||||
-Werror=declaration-after-statement
|
||||
-Werror=vla"
|
||||
])
|
||||
|
||||
AS_CASE([$enable_maintainer_flags],
|
||||
[yes],
|
||||
|
Reference in New Issue
Block a user