summaryrefslogtreecommitdiff
path: root/tests/projects/c++/modules
diff options
context:
space:
mode:
Diffstat (limited to 'tests/projects/c++/modules')
-rw-r--r--tests/projects/c++/modules/culling/src/hello.mpp10
-rw-r--r--tests/projects/c++/modules/culling/test.lua1
-rw-r--r--tests/projects/c++/modules/culling/xmake.lua7
-rw-r--r--tests/projects/c++/modules/culling2/src/hello.mpp10
-rw-r--r--tests/projects/c++/modules/culling2/test.lua1
-rw-r--r--tests/projects/c++/modules/culling2/xmake.lua6
6 files changed, 35 insertions, 0 deletions
diff --git a/tests/projects/c++/modules/culling/src/hello.mpp b/tests/projects/c++/modules/culling/src/hello.mpp
new file mode 100644
index 000000000..124bd72bc
--- /dev/null
+++ b/tests/projects/c++/modules/culling/src/hello.mpp
@@ -0,0 +1,10 @@
+module;
+#include <cstdio>
+
+export module hello;
+
+export namespace hello {
+ void say(const char* str) {
+ printf("%s\n", str);
+ }
+}
diff --git a/tests/projects/c++/modules/culling/test.lua b/tests/projects/c++/modules/culling/test.lua
new file mode 100644
index 000000000..7717f8049
--- /dev/null
+++ b/tests/projects/c++/modules/culling/test.lua
@@ -0,0 +1 @@
+inherit(".test_base")
diff --git a/tests/projects/c++/modules/culling/xmake.lua b/tests/projects/c++/modules/culling/xmake.lua
new file mode 100644
index 000000000..33d3934b9
--- /dev/null
+++ b/tests/projects/c++/modules/culling/xmake.lua
@@ -0,0 +1,7 @@
+add_rules("mode.release", "mode.debug")
+set_languages("c++20")
+
+target("culling")
+ set_kind("static")
+ add_files("src/*.mpp")
+ set_policy("build.c++.modules.culling", false)
diff --git a/tests/projects/c++/modules/culling2/src/hello.mpp b/tests/projects/c++/modules/culling2/src/hello.mpp
new file mode 100644
index 000000000..124bd72bc
--- /dev/null
+++ b/tests/projects/c++/modules/culling2/src/hello.mpp
@@ -0,0 +1,10 @@
+module;
+#include <cstdio>
+
+export module hello;
+
+export namespace hello {
+ void say(const char* str) {
+ printf("%s\n", str);
+ }
+}
diff --git a/tests/projects/c++/modules/culling2/test.lua b/tests/projects/c++/modules/culling2/test.lua
new file mode 100644
index 000000000..7717f8049
--- /dev/null
+++ b/tests/projects/c++/modules/culling2/test.lua
@@ -0,0 +1 @@
+inherit(".test_base")
diff --git a/tests/projects/c++/modules/culling2/xmake.lua b/tests/projects/c++/modules/culling2/xmake.lua
new file mode 100644
index 000000000..9a4d682bd
--- /dev/null
+++ b/tests/projects/c++/modules/culling2/xmake.lua
@@ -0,0 +1,6 @@
+add_rules("mode.release", "mode.debug")
+set_languages("c++20")
+
+target("culling")
+ set_kind("static")
+ add_files("src/*.mpp", {cull = false})