[PATCH libinput 5/8] test: silence compiler warning for C++ build test
Peter Hutterer
peter.hutterer at who-t.net
Thu Jun 5 23:19:03 PDT 2014
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for
C/ObjC but not for C++ [enabled by default]
Since gcc also complains about adding -Wno-strict-prototypes we have to handle
the two separately. A side-effect here: now that we promote the GCC_CFLAGS to
AM_CFLAGS, litest.la is built with the correct CFLAGS too.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
configure.ac | 4 +++-
test/Makefile.am | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index ec9b0de..0e4cecc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,9 +59,11 @@ PKG_CHECK_MODULES(LIBUDEV, [libudev])
PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
if test "x$GCC" = "xyes"; then
- GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
+ GCC_CXXFLAGS="-Wall -Wextra -Wno-unused-parameter -g -fvisibility=hidden"
+ GCC_CFLAGS="$GCC_CXXFLAGS -Wmissing-prototypes -Wstrict-prototypes"
fi
AC_SUBST(GCC_CFLAGS)
+AC_SUBST(GCC_CXXFLAGS)
AC_PATH_PROG(DOXYGEN, [doxygen])
if test "x$DOXYGEN" = "x"; then
diff --git a/test/Makefile.am b/test/Makefile.am
index fa6d90d..53a3300 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -4,8 +4,11 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \
$(CHECK_CFLAGS) \
$(LIBEVDEV_CFLAGS)
+AM_CFLAGS = $(GCC_CFLAGS)
+AM_CXXFLAGS = $(GCC_CXXFLAGS)
+
TEST_LIBS = liblitest.la $(CHECK_LIBS) $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS) $(top_builddir)/src/libinput.la -lm
-TEST_CFLAGS = $(GCC_CFLAGS) $(AM_CFLAGS)
+TEST_CFLAGS = $(AM_CFLAGS)
noinst_LTLIBRARIES = liblitest.la
liblitest_la_SOURCES = \
$(top_srcdir)/src/libinput-util.h \
--
1.9.3
More information about the wayland-devel
mailing list