aboutsummaryrefslogtreecommitdiff
path: root/tests/cc/modules/common.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cc/modules/common.testscript')
-rw-r--r--tests/cc/modules/common.testscript23
1 files changed, 20 insertions, 3 deletions
diff --git a/tests/cc/modules/common.testscript b/tests/cc/modules/common.testscript
index 6f09c62..9883e42 100644
--- a/tests/cc/modules/common.testscript
+++ b/tests/cc/modules/common.testscript
@@ -2,7 +2,7 @@
# license : MIT; see accompanying LICENSE file
crosstest = false
-test.arguments = config.cxx=$quote($recall($cxx.path) $cxx.config.mode, true)
+test.arguments = config.cxx=$quote($recall($cxx.path) $cxx.config.mode)
.include ../../common.testscript
@@ -21,7 +21,15 @@ cxx.std = experimental
cxx.features.symexport = true
# @@ TMP revise
-if ($cxx.id == 'gcc')
+#
+# 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.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
@@ -38,7 +46,7 @@ if ($cxx.target.class == 'windows')
exe{*}: test = true
EOI
-# Determine if we have modules and header units support.
+# Determine if we have named modules and header units support.
#
+$* noop <<EOI | set modules
print $cxx.features.modules
@@ -47,3 +55,12 @@ EOI
+$* noop <<EOI | set headers
print ($cxx.features.modules && $cxx.id == 'gcc')
EOI
+
+# @@ TMP: modules support is broken in MinGW GCC (not just symexport).
+# @@ TMP: try modules with Clang on Windows (symexport seems to work).
+#
+if ($cxx.target.class == 'windows' && \
+ ($cxx.id == 'gcc' || $cxx.id.type == 'clang'))
+ modules = false
+ headers = false
+end