[gjs/wip/ptomato/warnings: 10/10] WIP - enable AX_COMPILER_FLAGS



commit fef8fad2c135d67d8fd475b4ed370c942f278ff6
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Oct 2 15:55:47 2016 -0700

    WIP - enable AX_COMPILER_FLAGS

 Makefile-insttest.am |   18 +++++++++++++++---
 Makefile.am          |    9 +++++++--
 configure.ac         |    7 ++++++-
 3 files changed, 28 insertions(+), 6 deletions(-)
---
diff --git a/Makefile-insttest.am b/Makefile-insttest.am
index f4b94ac..4bc1165 100644
--- a/Makefile-insttest.am
+++ b/Makefile-insttest.am
@@ -97,7 +97,11 @@ libgimarshallingtests_la_LIBADD = $(common_test_libadd)
 Regress-1.0.gir: libregress.la
 Regress_1_0_gir_LIBS = libregress.la
 Regress_1_0_gir_FILES = $(nodist_libregress_la_SOURCES)
-Regress_1_0_gir_SCANNERFLAGS = --warn-all --warn-error $(libregress_scannerflags_includes)
+Regress_1_0_gir_SCANNERFLAGS =                 \
+       --warn-all --warn-error                 \
+       $(libregress_scannerflags_includes)     \
+       $(WARN_SCANNERFLAGS)                    \
+       $(NULL)
 if !ENABLE_CAIRO
 Regress_1_0_gir_CFLAGS = -D_GI_DISABLE_CAIRO
 endif
@@ -107,14 +111,22 @@ WarnLib-1.0.gir: libwarnlib.la
 WarnLib_1_0_gir_LIBS = libwarnlib.la
 WarnLib_1_0_gir_INCLUDES = Gio-2.0
 WarnLib_1_0_gir_FILES = $(nodist_libwarnlib_la_SOURCES)
-WarnLib_1_0_gir_SCANNERFLAGS = --c-include="warnlib.h" --symbol-prefix=warnlib_
+WarnLib_1_0_gir_SCANNERFLAGS =         \
+       --c-include="warnlib.h"         \
+       --symbol-prefix=warnlib_        \
+       $(WARN_SCANNERFLAGS)            \
+       $(NULL)
 TEST_INTROSPECTION_GIRS += WarnLib-1.0.gir
 
 GIMarshallingTests-1.0.gir: libgimarshallingtests.la
 GIMarshallingTests_1_0_gir_LIBS = libgimarshallingtests.la
 GIMarshallingTests_1_0_gir_INCLUDES = Gio-2.0
 GIMarshallingTests_1_0_gir_FILES = $(nodist_libgimarshallingtests_la_SOURCES)
-GIMarshallingTests_1_0_gir_SCANNERFLAGS = --symbol-prefix=gi_marshalling_tests --warn-all --warn-error
+GIMarshallingTests_1_0_gir_SCANNERFLAGS =      \
+       --symbol-prefix=gi_marshalling_tests    \
+       --warn-all --warn-error                 \
+       $(WARN_SCANNERFLAGS)                    \
+       $(NULL)
 TEST_INTROSPECTION_GIRS += GIMarshallingTests-1.0.gir
 
 $(foreach gir,$(TEST_INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir))))
diff --git a/Makefile.am b/Makefile.am
index 68e7e34..480e53c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,7 @@ INTROSPECTION_GIRS =
 ACLOCAL_AMFLAGS = -I m4
 AM_CXXFLAGS = $(WARN_CXXFLAGS) $(CODE_COVERAGE_CFLAGS)
 AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gjs\" $(CODE_COVERAGE_CPPFLAGS)
-AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS) $(CODE_COVERAGE_LDFLAGS)
 MAINTAINERCLEANFILES =                                 \
        $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL)      \
        $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN)   \
@@ -181,7 +181,12 @@ GjsPrivate-1.0.gir: libgjs.la
 GjsPrivate_1_0_gir_LIBS = libgjs.la
 GjsPrivate_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0
 GjsPrivate_1_0_gir_FILES = $(libgjs_private_source_files)
-GjsPrivate_1_0_gir_SCANNERFLAGS = --identifier-prefix=Gjs --symbol-prefix=gjs_ --warn-all
+GjsPrivate_1_0_gir_SCANNERFLAGS =      \
+       --identifier-prefix=Gjs         \
+       --symbol-prefix=gjs_            \
+       --warn-all                      \
+       $(WARN_SCANNERFLAGS)            \
+       $(NULL)
 
 if ENABLE_GTK
 GjsPrivate_1_0_gir_INCLUDES += Gtk-3.0
diff --git a/configure.ac b/configure.ac
index d132e35..3e57c02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,12 @@ AC_PROG_MKDIR_P
 AC_PROG_LN_S
 AC_PROG_SED
 
-GNOME_CXX_WARNINGS([maximum])
+dnl -Wno-switch-enum: We do a lot of switching on GI type enums here, and it
+dnl would be unreadable to list each of the 20 or so enum values every time.
+dnl -Wno-undef: grr, this is in a mozilla header, and you can't filter it out
+dnl using pragmas: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
+dnl use pragma system header instead?
+AX_COMPILER_FLAGS(,,,,[-Wno-switch-enum -Wno-undef])
 
 AX_CODE_COVERAGE
 dnl Clang does not need to link with -lgcov


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