[glibmm/sigc3v2: 2/7] Try to disable -Wunused-function for the glibmm_interface_move test.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/sigc3v2: 2/7] Try to disable -Wunused-function for the glibmm_interface_move test.
- Date: Thu, 31 Mar 2016 12:21:39 +0000 (UTC)
commit eb059a555103c4557e7a710872f0311e2de518b0
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Mar 2 09:14:28 2016 +0100
Try to disable -Wunused-function for the glibmm_interface_move test.
To deal with this clang warning when building with --enable-warnings=fatal.
TODO: However, this doesn't actually seem to disable the error.
glibmm_interface_move/main.cc:9:1: error: unused function 'glib_autoptr_cleanup_TestIface'
[-Werror,-Wunused-function]
G_DECLARE_INTERFACE(TestIface, test_Iface, TEST, IFACE, GObject)
^
/opt/gnome/include/glib-2.0/gobject/gtype.h:1565:3: note: expanded from macro 'G_DECLARE_INTERFACE'
_GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, PrerequisiteName)
\
^
/opt/gnome/include/glib-2.0/glib/gmacros.h:421:22: note: expanded from macro
'_GLIB_DEFINE_AUTOPTR_CHAINUP'
static inline void _GLIB_AUTOPTR_FUNC_NAME(ModuleObjName) (ModuleObjName **_ptr) { \
^
/opt/gnome/include/glib-2.0/glib/gmacros.h:415:43: note: expanded from macro '_GLIB_AUTOPTR_FUNC_NAME'
^
<scratch space>:224:1: note: expanded from here
glib_autoptr_cleanup_TestIface
configure.ac | 8 +++++++-
tests/Makefile.am | 5 ++++-
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c575000..ba3281f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,10 +114,16 @@ MM_ARG_WITH_TAGFILE_DOC([libsigc++-2.0.tag], [sigc++-2.0])
# Check whether --enable-debug-refcounting was given.
GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING
+glibmm_warnings_fatal='-pedantic -Wall -Wextra -Wformat-security -Wsuggest-override -Wshadow -Wno-long-long'
# Evaluate the --enable-warnings=level option.
MM_ARG_ENABLE_WARNINGS([GLIBMM_WXXFLAGS],
[-Wall],
- [-pedantic -Wall -Wextra -Wformat-security -Wsuggest-override -Wshadow
-Wno-long-long],
+ [$glibmm_warnings_fatal],
+ [G SIGCXX])
+
+MM_ARG_ENABLE_WARNINGS([GLIBMM_INTERFACE_TEST_WXXFLAGS],
+ [-Wall],
+ [$glibmm_warnings_fatal -Wno-unused-function],
[G SIGCXX])
# Offer the ability to omit some API from the library,
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b2dddc3..0268c11 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -55,8 +55,9 @@ glibmm_includes = -I$(top_builddir)/glib $(if $(srcdir:.=),-I$(top_srcdir)/glib)
giomm_includes = -I$(top_builddir)/gio $(if $(srcdir:.=),-I$(top_srcdir)/gio)
local_cppflags = -I$(top_builddir) $(glibmm_includes) $(giomm_includes)
+cxxflags_disable_deprecated = $(GLIBMM_WXXFLAGS) -DGLIBMM_DISABLE_DEPRECATED -DGIOMM_DISABLE_DEPRECATED
AM_CPPFLAGS = $(local_cppflags) $(GIOMM_CFLAGS)
-AM_CXXFLAGS = $(GLIBMM_WXXFLAGS) -DGLIBMM_DISABLE_DEPRECATED -DGIOMM_DISABLE_DEPRECATED
+AM_CXXFLAGS = $(GLIBMM_WXXFLAGS) $(cxxflags_disable_deprecated)
local_libglibmm = $(top_builddir)/glib/glibmm/libglibmm-$(GLIBMM_API_VERSION).la
@@ -92,6 +93,8 @@ glibmm_interface_implementation_test_SOURCES = glibmm_interface_implementation/m
glibmm_interface_implementation_test_LDADD = $(giomm_ldadd)
glibmm_interface_move_test_SOURCES = glibmm_interface_move/main.cc
+glibmm_interface_move_test_CXXFLAGS = $(GLIBMM_INTERFACE_TEST_WXXFLAGS) $(cxxflags_disable_deprecated)
+
glibmm_mainloop_test_SOURCES = glibmm_mainloop/main.cc
glibmm_nodetree_test_SOURCES = glibmm_nodetree/main.cc
glibmm_object_move_test_SOURCES = glibmm_object_move/main.cc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]