summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-02-06 22:34:55 +0800
committerruki <[email protected]>2024-02-06 22:34:55 +0800
commit1328e9a90cbc4be7d3019539226c61f3d7eccac6 (patch)
tree7ff94badfa550ebba014e8c8d6ed7a4a04fa92a2
parent619db25f2c85fa771643b3924632915f332b9cce (diff)
improve to find cosmocc
-rw-r--r--xmake/modules/detect/tools/find_cosmocc.lua2
-rw-r--r--xmake/modules/detect/tools/find_cosmocxx.lua3
2 files changed, 4 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/find_cosmocc.lua b/xmake/modules/detect/tools/find_cosmocc.lua
index 4b0f689e4..102c45284 100644
--- a/xmake/modules/detect/tools/find_cosmocc.lua
+++ b/xmake/modules/detect/tools/find_cosmocc.lua
@@ -42,7 +42,7 @@ function main(opt)
if program and opt and opt.version then
version = find_programver(program, opt)
end
- if program then
+ if program and is_host("windows") then
program = program:gsub("\\", "/")
end
return program, version
diff --git a/xmake/modules/detect/tools/find_cosmocxx.lua b/xmake/modules/detect/tools/find_cosmocxx.lua
index 535cea6ab..06ce69aac 100644
--- a/xmake/modules/detect/tools/find_cosmocxx.lua
+++ b/xmake/modules/detect/tools/find_cosmocxx.lua
@@ -38,6 +38,9 @@ function main(opt)
opt = opt or {}
opt.shell = true
local program = find_program(opt.program or "cosmoc++", opt)
+ if program and is_host("windows") then
+ program = program:gsub("\\", "/")
+ end
local version = nil
if program and opt and opt.version then
version = find_programver(program, opt)