test: add a build test for -Wpedantic

A user of libevdev may be compiled with -Wpedantic. Our header files should
not produce any warnings, so add a simple test that merely includes both
public header files and compiles with -Wpedantic -Werror.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
Peter Hutterer 2013-11-22 12:15:19 +10:00
parent 5812ae0b7a
commit a742d253b7
3 changed files with 11 additions and 1 deletions

1
test/.gitignore vendored
View file

@ -1,2 +1,3 @@
gcov-report.txt
test-libevdev
test-compile-pedantic

View file

@ -1,5 +1,5 @@
if BUILD_TESTS
noinst_PROGRAMS = test-libevdev
noinst_PROGRAMS = test-libevdev test-compile-pedantic
TESTS = $(noinst_PROGRAMS)
@ -33,6 +33,9 @@ test_libevdev_SOURCES = \
test_libevdev_LDADD = $(CHECK_LIBS) $(GCOV_LDFLAGS)
test_compile_pedantic_SOURCES = test-compile-pedantic.c
test_compile_pedantic_CFLAGS = $(AM_CPPFLAGS) -Wpedantic -Werror -std=c90
if GCOV_ENABLED
CLEANFILES = gcov-report.txt

View file

@ -0,0 +1,6 @@
#include <libevdev/libevdev.h>
#include <libevdev/libevdev-uinput.h>
int main(void) {
return 0;
}