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.testscript18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/cc/modules/common.testscript b/tests/cc/modules/common.testscript
index b383dc1..9883e42 100644
--- a/tests/cc/modules/common.testscript
+++ b/tests/cc/modules/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
@@ -48,9 +56,11 @@ EOI
print ($cxx.features.modules && $cxx.id == 'gcc')
EOI
-# @@ TMP: modules support is completely broken in MinGW GCC 11.x.
+# @@ 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')
+if ($cxx.target.class == 'windows' && \
+ ($cxx.id == 'gcc' || $cxx.id.type == 'clang'))
modules = false
headers = false
end