mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 00:38:01 +02:00
test: Add include from C++ build test
This commit is contained in:
parent
7b3b5f173b
commit
07750ef798
3 changed files with 23 additions and 1 deletions
|
|
@ -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"])
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
11
test/build-cxx.cc
Normal file
11
test/build-cxx.cc
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <libinput.h>
|
||||
|
||||
/* This is a build-test only */
|
||||
|
||||
using namespace std;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue