[clutter] build: Add --disable-Werror
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] build: Add --disable-Werror
- Date: Mon, 30 Nov 2015 13:19:48 +0000 (UTC)
commit 3b6ed43edd46b46e115d9d3fdc98d0d9e92857f6
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Nov 30 13:15:52 2015 +0000
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.
configure.ac | 33 +++++++++++++++++++++------------
1 files changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3640492..a6fc6cd 100644
--- a/configure.ac
+++ b/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],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]