summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2021-10-27 00:54:44 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2021-11-03 21:18:55 +0100
commiteef3638d227625e7d4c75bf536b3d5abb823b423 (patch)
tree7d53a98b6df18bbdc021073c01e1c632ef94883a /tests
parentd7823edd44b5b6b7ea5ddb6d222dac07ff0ae217 (diff)
downloadlibgphoto2-eef3638d227625e7d4c75bf536b3d5abb823b423.tar.gz
tests: add pedantic compile tests for -std={c2x,c++20}
Add a pedantic C compile test for c2x in addition to the existing ones for c90, c99, and c11. Add a pedantic C++ compile test for c++20 in addition to the existing ones for c++98, c++11, c++14, and c++17.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f3a615b94..5933f72ee 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -132,6 +132,17 @@ test_pedantic_c11_CFLAGS = $(GP_PEDANTIC_CFLAGS_C11)
test_pedantic_c11_LDADD =
test_pedantic_c11_LDFLAGS =
+if GP_HAVE_PEDANTIC_FLAGS_C2X
+TESTS += test-pedantic-c2x
+check_PROGRAMS += test-pedantic-c2x
+endif
+EXTRA_PROGRAMS += test-pedantic-c2x
+test_pedantic_c2x_SOURCES = test-pedantic-compilation.c
+test_pedantic_c2x_CPPFLAGS = $(generic_pedantic_cppflags)
+test_pedantic_c2x_CFLAGS = $(GP_PEDANTIC_CFLAGS_C2X)
+test_pedantic_c2x_LDADD =
+test_pedantic_c2x_LDFLAGS =
+
if HAVE_CXX
if GP_HAVE_PEDANTIC_FLAGS_CXX98
TESTS += test-pedantic-cxx98
@@ -184,6 +195,19 @@ test_pedantic_cxx17_CXXFLAGS = $(GP_PEDANTIC_CXXFLAGS_CXX17)
test_pedantic_cxx17_LDADD =
test_pedantic_cxx17_LDFLAGS =
+if HAVE_CXX
+if GP_HAVE_PEDANTIC_FLAGS_CXX20
+TESTS += test-pedantic-cxx20
+check_PROGRAMS += test-pedantic-cxx20
+endif
+endif
+EXTRA_PROGRAMS += test-pedantic-cxx20
+test_pedantic_cxx20_SOURCES = test-pedantic-compilation.cxx
+test_pedantic_cxx20_CPPFLAGS = $(generic_pedantic_cppflags)
+test_pedantic_cxx20_CXXFLAGS = $(GP_PEDANTIC_CXXFLAGS_CXX20)
+test_pedantic_cxx20_LDADD =
+test_pedantic_cxx20_LDFLAGS =
+
########################################################################
# Implement the checks for the installed library