tests: run the C++ tests on all the available standards

This is much of course more efficient than in the matrix of the CI (or
on our own machines), but a bit more tedious.

* configure.ac (CXX03_CXXFLAGS, CXX11_CXXFLAGS, CXX14_CXXFLAGS)
(CXX17_CXXFLAGS, CXX2A_CXXFLAGS, STDCXX_FLAGS): New.
* tests/atlocal.in: Receive them.
* tests/local.at (AT_FOR_EACH_CXX): New.
* tests/c++.at: Use AT_FOR_EACH_CXX.
This commit is contained in:
Akim Demaille
2018-09-12 22:01:32 +02:00
parent 84744e5f63
commit 9ff76cdda8
4 changed files with 40 additions and 7 deletions

View File

@@ -563,7 +563,16 @@ main (int argc, char const* argv[])
return p.parse ();
}]])
m4_define([AT_FOR_EACH_CXX],
[[at_for_each_cxx_CXXFLAGS_save=$CXXFLAGS
for at_cxx_std in "" $STDCXX_FLAGS
do
]AS_ECHO(["Testing with C++ standard flags: '$at_cxx_std'"])[
CXXFLAGS="$at_for_each_cxx_CXXFLAGS_save $at_cxx_std"
]$1[
done
CXXFLAGS=$at_for_each_cxx_CXXFLAGS_save
]])
## ------ ##
## Java. ##