[california] Enable/disable fatal warnings in build



commit b3d089b250495bb452a2a9a822a6719d99dae0ae
Author: Jim Nelson <jim yorba org>
Date:   Wed Dec 3 18:12:57 2014 -0800

    Enable/disable fatal warnings in build

 configure.ac    |   16 ++++++++++++++++
 src/Makefile.am |    6 +++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2d9c27d..0898add 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,6 +86,21 @@ AC_MSG_RESULT($unity)
 AM_CONDITIONAL(ENABLE_UNITY, test "x$unity" = "xyes")
 
 #
+# Fatal warnings (valac only)
+#
+
+AC_MSG_CHECKING([fatal Vala warnings])
+AC_ARG_ENABLE(
+    fatal,
+    [  --disable-fatal         disable fatal warnings from Vala compiler [[default=enabled]]],
+    [ fatal=$enableval ],
+    [ fatal=yes ]
+)
+
+AC_MSG_RESULT($fatal)
+AM_CONDITIONAL(DISABLE_FATAL_WARNINGS, test "x$fatal" = "xno")
+
+#
 # /configure switches
 #
 
@@ -102,5 +117,6 @@ AC_OUTPUT
 AC_MSG_RESULT([
 Options:
        Unity support:          $unity
+       Fatal Vala warnings:    $fatal
 ])
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 2749c2f..f91c67c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -227,8 +227,12 @@ if HAVE__NL_TIME_FIRST_WEEKDAY
 california_OPTIONAL_VALAFLAGS += --define HAVE__NL_TIME_FIRST_WEEKDAY
 endif
 
+if !DISABLE_FATAL_WARNINGS
+california_OPTIONAL_VALAFLAGS += --fatal-warnings
+endif
+
 california_VALAFLAGS = \
-       --fatal-warnings --debug --enable-checking --vapidir $(top_srcdir)/vapi --target-glib=2.38 \
+       --debug --enable-checking --vapidir $(top_srcdir)/vapi --target-glib=2.38 \
        --enable-deprecated \
        --gresources=california-resources.xml \
        $(california_OPTIONAL_VALAFLAGS) \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]