summaryrefslogtreecommitdiff
path: root/xmake/core
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-01 00:59:29 +0800
committerruki <[email protected]>2022-04-01 00:59:29 +0800
commit32e8ae94db5070246ec8d4dfa8c024376ff32872 (patch)
tree0e55d6d50d5038df7933604d31c4fa2ae485dadb /xmake/core
parent064a55f2639510ef34e967ce64589531bab1afc6 (diff)
improve to find zig c++
Diffstat (limited to 'xmake/core')
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_program.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
index 59a01f746..90dd963fb 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua
@@ -87,6 +87,11 @@ function sandbox_lib_detect_find_program._check(program, opt)
end
if sandbox_lib_detect_find_program._do_check(findname, opt) then
return program
+ -- check "zig c++" without ".exe"
+ -- https://github.com/xmake-io/xmake/issues/2232
+ elseif findname ~= program and path.filename(program):find(" ", 1, true) and
+ sandbox_lib_detect_find_program._do_check(program, opt) then
+ return program
end
end