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>
gcov-report.txt
test-libevdev
+test-compile-pedantic
if BUILD_TESTS
-noinst_PROGRAMS = test-libevdev
+noinst_PROGRAMS = test-libevdev test-compile-pedantic
TESTS = $(noinst_PROGRAMS)
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
--- /dev/null
+#include <libevdev/libevdev.h>
+#include <libevdev/libevdev-uinput.h>
+
+int main(void) {
+ return 0;
+}