summaryrefslogtreecommitdiff
path: root/tests/projects/c++
diff options
context:
space:
mode:
authorruki <[email protected]>2025-04-12 10:16:48 +0800
committerGitHub <[email protected]>2025-04-12 10:16:48 +0800
commit7cfbacd71f14c897e2749c0b931f9ff48a768744 (patch)
tree37a65113ad7da1a81e6d95b2d06a73e2a749ad0e /tests/projects/c++
parent4d20b980c0d3826641a7b0481145a5e495417f6e (diff)
parentc8e24bdbe3cc00955c8078412ef2104e625937a8 (diff)
Merge pull request #6315 from xmake-io/pch
Improve modules with pch
Diffstat (limited to 'tests/projects/c++')
-rw-r--r--tests/projects/c++/modules/hello_with_pch/test.lua1
-rw-r--r--tests/projects/c++/modules/test_pch.lua31
2 files changed, 1 insertions, 31 deletions
diff --git a/tests/projects/c++/modules/hello_with_pch/test.lua b/tests/projects/c++/modules/hello_with_pch/test.lua
new file mode 100644
index 000000000..7717f8049
--- /dev/null
+++ b/tests/projects/c++/modules/hello_with_pch/test.lua
@@ -0,0 +1 @@
+inherit(".test_base")
diff --git a/tests/projects/c++/modules/test_pch.lua b/tests/projects/c++/modules/test_pch.lua
deleted file mode 100644
index 98286c229..000000000
--- a/tests/projects/c++/modules/test_pch.lua
+++ /dev/null
@@ -1,31 +0,0 @@
-import("lib.detect.find_tool")
-import("core.base.semver")
-import("detect.sdks.find_vstudio")
-import("utils.ci.is_running", {alias = "ci_is_running"})
-
-function _build()
- if ci_is_running() then
- os.run("xmake -rvD")
- else
- os.run("xmake -r")
- end
- local outdata = os.iorun("xmake")
- if outdata then
- if outdata:find("compiling") or outdata:find("linking") or outdata:find("generating") then
- raise("Modules incremental compilation does not work\n%s", outdata)
- end
- end
-end
-
-function main(t)
- -- TODO c++ modules with pch does not work for gcc now.
- if is_host("linux") then
- local clang = find_tool("clang", {version = true})
- if clang then
- os.exec("xmake f --toolchain=clang -c --yes --policies=build.c++.modules.std:n,build.c++.clang.fallbackscanner")
- _build()
- end
- else
- _build()
- end
-end