summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-08-02 15:22:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-08-02 15:22:20 +0200
commit8a5d757613fcdd5cf6f66355b53bbd2023da96c4 (patch)
treed169baa2f044820101069874fdefffbe1b6e81a5
parentbed72679f20465b9d382b74060e74bcf72cacb85 (diff)
Indicate that source is preprocessed to modules
-rw-r--r--libmhello/build/root.build6
-rw-r--r--libmhello/tests/build/root.build3
2 files changed, 9 insertions, 0 deletions
diff --git a/libmhello/build/root.build b/libmhello/build/root.build
index 0f4a099..4286e66 100644
--- a/libmhello/build/root.build
+++ b/libmhello/build/root.build
@@ -2,6 +2,12 @@ cxx.std = experimental
cxx.features.symexport = true
+# Indicate that our sources do not use #include and module imports do not
+# depend on the preprocessor.
+#
+if ($cxx.id.type != 'msvc') # Temporary for 'export module M;' fixup.
+ cxx.preprocessed = modules
+
using cxx
assert $cxx.features.modules 'c++ compiler does not support modules'
diff --git a/libmhello/tests/build/root.build b/libmhello/tests/build/root.build
index 58dffed..9e8c50d 100644
--- a/libmhello/tests/build/root.build
+++ b/libmhello/tests/build/root.build
@@ -1,5 +1,8 @@
cxx.std = experimental
+if ($cxx.id.type != 'msvc') # Temporary for 'export module M;' fixup.
+ cxx.preprocessed = modules
+
using cxx
cxx{*}: extension = cxx