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.testscript27
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/cc/modules/common.testscript b/tests/cc/modules/common.testscript
index 2fbb9a5..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
@@ -13,11 +13,25 @@ EOI
+cat <<EOI >=build/root.build
using in
+using cxx.guess
+
# Force modules.
#
cxx.std = experimental
cxx.features.symexport = true
+# @@ TMP revise
+#
+# 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
hxx{*}: extension = hxx
@@ -32,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
@@ -41,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