From: Jonas Ã…dahl Date: Mon, 24 Mar 2014 22:45:05 +0000 (+0100) Subject: test: Add include from C++ build test X-Git-Tag: 0.2.0~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07750ef7988a98c1b3216fb6d52937c9ca07b539;p=platform%2Fupstream%2Flibinput.git test: Add include from C++ build test --- diff --git a/configure.ac b/configure.ac index afd04a45..e44adcb3 100644 --- a/configure.ac +++ b/configure.ac @@ -75,6 +75,9 @@ fi if test "x$build_tests" = "xyes" -a "x$HAVE_CHECK" = "xno"; then AC_MSG_ERROR([Cannot build tests, check is missing]) fi +if test "x$build_tests" = "xyes"; then + AC_PROG_CXX +fi AM_CONDITIONAL(BUILD_TESTS, [test "x$build_tests" = "xyes"]) diff --git a/test/Makefile.am b/test/Makefile.am index e05b8727..e111a124 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -20,7 +20,11 @@ liblitest_la_SOURCES = \ litest.c run_tests = test-udev test-path test-pointer test-touch test-log test-touchpad -build_tests = test-build-linker test-build-pedantic-c99 test-build-std-gnuc90 +build_tests = \ + test-build-cxx \ + test-build-linker \ + test-build-pedantic-c99 \ + test-build-std-gnuc90 noinst_PROGRAMS = $(build_tests) $(run_tests) TESTS = $(run_tests) @@ -67,4 +71,8 @@ test_build_linker_SOURCES = build-pedantic.c test_build_linker_CFLAGS = -I$(top_srcdir)/src test_build_linker_LDADD = $(top_builddir)/src/libinput.la +# test including from C++ +test_build_cxx_SOURCES = build-cxx.cc +test_build_cxx_CXXFLAGS = -Wall -Wextra -Wno-unused-parameter $(AM_CXXFLAGS) + endif diff --git a/test/build-cxx.cc b/test/build-cxx.cc new file mode 100644 index 00000000..c3ad4994 --- /dev/null +++ b/test/build-cxx.cc @@ -0,0 +1,11 @@ +#include + +/* This is a build-test only */ + +using namespace std; + +int +main(int argc, char **argv) +{ + return 0; +}