aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-12-14 07:42:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-12-14 09:29:01 +0200
commit5745a2fe944dca5612b31c099101914d6c60b223 (patch)
tree8f3b1828a4be49b05c785e431754f3c4dcc9cc5f /tests
parent22f50c76dd8d92cb64461f979369b601272a4772 (diff)
Allow enabling C++ modules for C++20 and later std.cxx values
Diffstat (limited to 'tests')
-rw-r--r--tests/cc/modules/common.testscript10
-rw-r--r--tests/cc/preprocessed/testscript1
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/cc/modules/common.testscript b/tests/cc/modules/common.testscript
index f430f8a..9883e42 100644
--- a/tests/cc/modules/common.testscript
+++ b/tests/cc/modules/common.testscript
@@ -25,11 +25,11 @@ cxx.features.symexport = true
# Note: there are some issues with enabling modules in Apple Clang 15 so
# for now we only test vanilla Clang.
#
-if ($cxx.id == 'gcc' || \
- ($cxx.id == 'msvc' && ($cxx.version.major > 19 || \
- ($cxx.version.major == 19 && \
- $cxx.version.minor >= 36))) || \
- ($cxx.id == 'clang' && $cxx.version.major >= 16))
+if (($cxx.id == 'gcc' && $cxx.version.major >= 11) || \
+ ($cxx.id == 'clang' && $cxx.version.major >= 16) || \
+ ($cxx.id == 'msvc' && ($cxx.version.major > 19 || \
+ ($cxx.version.major == 19 && \
+ $cxx.version.minor >= 36))))
cxx.features.modules = true
using cxx
diff --git a/tests/cc/preprocessed/testscript b/tests/cc/preprocessed/testscript
index 507a92d..53e7755 100644
--- a/tests/cc/preprocessed/testscript
+++ b/tests/cc/preprocessed/testscript
@@ -98,6 +98,7 @@ $* &test* <<EOI 2>>EOE != 0
exe{test}: cxx{test}
EOI
error: modules support required by cxx{test}
+ info: consider enabling modules with cxx.features.modules=true in root.build
EOE
: all