From 63927631a46508d3d5157303522511cdd891869b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 6 Jun 2014 09:38:35 +1000 Subject: [PATCH] test: silence compiler warning for C++ build test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Hans de Goede --- configure.ac | 4 +++- test/Makefile.am | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d8e3358a..13cf3a81 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 fa6d90d6..53a33003 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 \ -- 2.34.1