[PATCH weston v2] build: Add an --enable-fatal-warnings configure option
Derek Foreman
derekf at osg.samsung.com
Wed Jan 13 14:13:26 PST 2016
New --enable-fatal-warnings ./configure option that just adds -Werror
to GCC_CFLAGS
Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
Mess with GCC_CFLAGS instead of CFLAGS
configure.ac | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 97cbfe5..a4f3336 100644
--- a/configure.ac
+++ b/configure.ac
@@ -544,8 +544,17 @@ fi
PKG_CHECK_MODULES(SETBACKLIGHT, [libudev libdrm], enable_setbacklight=yes, enable_setbacklight=no)
AM_CONDITIONAL(BUILD_SETBACKLIGHT, test "x$enable_setbacklight" = "xyes")
+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 \
+ GCC_CFLAGS="$WERROR_CFLAGS -Wall -Wextra -Wno-unused-parameter \
-Wno-missing-field-initializers -g -fvisibility=hidden \
-Wstrict-prototypes -Wmissing-prototypes -Wsign-compare"
fi
--
2.7.0.rc3
More information about the wayland-devel
mailing list