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

Derek Foreman derekf at osg.samsung.com
Tue Jan 12 13:35:41 PST 2016


New --enable-fatal-warnings ./configure option that just adds -Werror
to CFLAGS

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 configure.ac | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/configure.ac b/configure.ac
index 97cbfe5..d7fa1b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -632,6 +632,15 @@ AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
 
 AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
 
+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"], [
+        CFLAGS="$CFLAGS -Werror"
+])
+
 AC_OUTPUT
 
 AC_MSG_RESULT([
-- 
2.6.4



More information about the wayland-devel mailing list