summaryrefslogtreecommitdiff
path: root/tests/projects/c++/modules/test_stdmodules.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2025-05-11 16:40:17 +0200
committerArthur LAURENT <[email protected]>2025-05-11 16:40:17 +0200
commit3957616a70abb1530c1956839485f60480f53401 (patch)
tree1af177420fdae230c1d0d58824f1cfd3b7d85ea3 /tests/projects/c++/modules/test_stdmodules.lua
parente1cf8f6a8c4457b0a77e5f2f16fbf5e73252dd50 (diff)
(C++ modules support) enable std module tests for gcc >= 15
Diffstat (limited to 'tests/projects/c++/modules/test_stdmodules.lua')
-rw-r--r--tests/projects/c++/modules/test_stdmodules.lua28
1 files changed, 16 insertions, 12 deletions
diff --git a/tests/projects/c++/modules/test_stdmodules.lua b/tests/projects/c++/modules/test_stdmodules.lua
index d9b25ef56..0ca1cc9de 100644
--- a/tests/projects/c++/modules/test_stdmodules.lua
+++ b/tests/projects/c++/modules/test_stdmodules.lua
@@ -38,21 +38,25 @@ function main(t)
end
end
elseif is_subhost("msys") then
- -- os.exec("xmake f -c -p mingw --yes")
- -- _build()
+ local gcc = find_tool("gcc", {version = true})
+ if is_host("linux") and gcc and gcc.version and semver.compare(gcc.version, "15.0") >= 0 then
+ os.exec("xmake f -c -p mingw --yes")
+ _build()
+ end
elseif is_host("linux") then -- or is_host("macosx") then
- -- gcc don't support std modules atm
- -- local gcc = find_tool("gcc", {version = true})
- -- if is_host("linux") and gcc and gcc.version and semver.compare(gcc.version, "11.0") >= 0 then
- -- os.exec("xmake f -c --yes")
- -- _build()
- -- end
+ local gcc = find_tool("gcc", {version = true})
+ if is_host("linux") and gcc and gcc.version and semver.compare(gcc.version, "15.0") >= 0 then
+ os.exec("xmake f -c --yes")
+ _build()
+ end
local clang = find_tool("clang", {version = true})
if clang and clang.version and semver.compare(clang.version, "19.0") >= 0 then
- -- clang don't support libstdc++ std modules atm
- -- os.exec("xmake clean -a")
- -- os.exec("xmake f --toolchain=clang -c --yes")
- -- _build()
+ local gcc = find_tool("clang", {version = true})
+ if gcc and gcc.version and semver.compare(gcc.version, "15.0") >= 0 then
+ os.exec("xmake clean -a")
+ os.exec("xmake f --toolchain=clang -c --yes")
+ _build()
+ end
os.exec("xmake clean -a")
os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes")
_build()