summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-07-29 11:23:42 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-07-29 16:47:36 +0200
commit80923051b3e803bf5bdc118c3bac246a308497d6 (patch)
tree0ef4ea6ea1f870bce415ad449b4a7b6c54d36e0d /tests
parent9748b3e9a0732a173337dcd64266e803a3c77c0e (diff)
downloadgobject-introspection-80923051b3e803bf5bdc118c3bac246a308497d6.tar.gz
autotools: start using AX_COMPILER_FLAGS, enable -Werror on CI
* This adds a new dependency on autoconf-archive. * Pass WARN_CFLAGS/WARN_LDFLAGS/WARN_SCANNERFLAGS to everything we control the source of * Disables all warning flags which make the build error out for now, we'll re-enable them in followup commits. * AX_COMPILER_FLAGS is used with the release flag always on so we don't get -Werror by default.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am10
-rw-r--r--tests/offsets/Makefile.am5
-rw-r--r--tests/repository/Makefile.am4
-rw-r--r--tests/scanner/Makefile.am4
4 files changed, 15 insertions, 8 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d3e7c7f4..4bdb9c3b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -6,9 +6,6 @@ EXTRA_DIST=
BUILT_SOURCES=
CLEANFILES=
-AM_CFLAGS = $(GOBJECT_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) -I$(srcdir)
-LIBADD = $(GOBJECT_LIBS)
-
testsdir = $(datadir)/gobject-introspection-1.0/tests
tests_DATA = \
everything.c \
@@ -20,7 +17,14 @@ tests_DATA = \
EXTRA_LTLIBRARIES = libeverything-1.0.la libgimarshallingtests-1.0.la
libeverything_1_0_la_SOURCES = everything.c
+libeverything_1_0_la_CFLAGS = $(GOBJECT_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) $(WARN_CFLAGS) -I$(srcdir)
+libeverything_1_0_la_LDFLAGS = $(WARN_LDFLAGS)
+libeverything_1_0_la_LIBADD = $(GOBJECT_LIBS)
+
libgimarshallingtests_1_0_la_SOURCES = gimarshallingtests.c
+libgimarshallingtests_1_0_la_CFLAGS = $(GOBJECT_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) $(WARN_CFLAGS) -I$(srcdir)
+libgimarshallingtests_1_0_la_LDFLAGS = $(WARN_LDFLAGS)
+libgimarshallingtests_1_0_la_LIBADD = $(GOBJECT_LIBS)
EXTRA_DIST += \
gimarshallingtests.h \
diff --git a/tests/offsets/Makefile.am b/tests/offsets/Makefile.am
index fa1c1001..269b0ce1 100644
--- a/tests/offsets/Makefile.am
+++ b/tests/offsets/Makefile.am
@@ -17,8 +17,9 @@ liboffsets_la_SOURCES = \
offsets.h \
offsets.c
liboffsets_la_CPPFLAGS = $(GIREPO_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) -I$(top_srcdir)/tests
+liboffsets_la_CFLAGS = $(WARN_CFLAGS)
# dummy rpath to get built dynamically (huh?)
-liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir)
+liboffsets_la_LDFLAGS = $(WARN_LDFLAGS) -avoid-version -rpath $(libdir)
Offsets-1.0.gir: liboffsets.la offsets.h
Offsets_1_0_gir_INCLUDES = GObject-2.0
@@ -36,6 +37,8 @@ EXTRA_PROGRAMS += gitestoffsets
nodist_gitestoffsets_SOURCES = gitestoffsets.c
gitestoffsets_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository -I$(top_srcdir)/tests
+gitestoffsets_CFLAGS = $(WARN_CFLAGS)
+gitestoffsets_LDFLAGS = $(WARN_LDFLAGS)
gitestoffsets_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS)
gitestoffsets.c: gen-gitestoffsets offsets.h Offsets-1.0.typelib
diff --git a/tests/repository/Makefile.am b/tests/repository/Makefile.am
index 6b4b782f..b6bde9d9 100644
--- a/tests/repository/Makefile.am
+++ b/tests/repository/Makefile.am
@@ -1,5 +1,5 @@
-AM_CFLAGS = $(GOBJECT_CFLAGS)
-AM_LDFLAGS = -module -avoid-version
+AM_CFLAGS = $(WARN_CFLAGS) $(GOBJECT_CFLAGS)
+AM_LDFLAGS = $(WARN_LDFLAGS) -module -avoid-version
LIBS = $(GOBJECT_LIBS)
EXTRA_PROGRAMS = gitestrepo giteststructinfo gitestthrows gitypelibtest
diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am
index 91c4a3ee..f7075856 100644
--- a/tests/scanner/Makefile.am
+++ b/tests/scanner/Makefile.am
@@ -22,10 +22,10 @@ CLEANFILES += $(EXTRA_LTLIBRARIES)
GI_SCANNER_CFLAGS = -I$(top_srcdir)/tests
AM_CPPFLAGS = -I$(top_srcdir)/girepository
-AM_CFLAGS = $(GIO_CFLAGS) $(GOBJECT_CFLAGS) $(GTHREAD_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) $(GI_SCANNER_CFLAGS)
+AM_CFLAGS = $(GIO_CFLAGS) $(GOBJECT_CFLAGS) $(GTHREAD_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) $(GI_SCANNER_CFLAGS) $(WARN_CFLAGS)
# -rpath needed to force libtool to build a shared library for a check_LTLIBRARIES
# target. See http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html
-AM_LDFLAGS = -rpath /unused -avoid-version
+AM_LDFLAGS = $(WARN_LDFLAGS) -rpath /unused -avoid-version
LIBS = $(GOBJECT_LIBS) $(GTHREAD_LIBS)
libsletter_la_SOURCES = sletter.c sletter.h