summaryrefslogtreecommitdiff
path: root/test/Makefile.am
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-12-06 14:18:39 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-01-15 11:26:08 +1000
commitfab5cc3439395e62dfd9fbdd8dbeb488ce39d34f (patch)
treeea43d183cd9c2bcd17c5c34908ec6bcfd12755b9 /test/Makefile.am
parent00496411169f7f8cb85ec73edc6f4093035fa659 (diff)
downloadlibinput-fab5cc3439395e62dfd9fbdd8dbeb488ce39d34f.tar.gz
test: add a build-test for -pedantic
We don't build with -pedantic, but a caller may try to actually stick to the c99 standard, so let's make sure our public header doesn't cause any issues there. Likewise, make sure that our header compiles with GNU C90. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/Makefile.am')
-rw-r--r--test/Makefile.am9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 444c1408..9b047325 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,9 +2,16 @@ if BUILD_TESTS
AM_CPPFLAGS = -I$(top_srcdir)/src
run_tests =
-build_tests =
+build_tests = test-build-pedantic-c99 test-build-std-gnuc90
noinst_PROGRAMS = $(build_tests) $(run_tests)
TESTS = $(run_tests)
+# build-test only
+test_build_pedantic_c99_SOURCES = build-pedantic.c
+test_build_pedantic_c99_CFLAGS = $(AM_CPPFLAGS) -std=c99 -pedantic -Werror
+
+test_build_std_gnuc90_SOURCES = build-pedantic.c
+test_build_std_gnuc90_CFLAGS = $(AM_CPPFLAGS) -std=gnu90 -Werror
+
endif