summaryrefslogtreecommitdiff
path: root/xmake/modules/lib/detect/check_cxsnippets.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/lib/detect/check_cxsnippets.lua')
-rw-r--r--xmake/modules/lib/detect/check_cxsnippets.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/modules/lib/detect/check_cxsnippets.lua b/xmake/modules/lib/detect/check_cxsnippets.lua
index 1e7dc604b..a6910522a 100644
--- a/xmake/modules/lib/detect/check_cxsnippets.lua
+++ b/xmake/modules/lib/detect/check_cxsnippets.lua
@@ -255,14 +255,17 @@ function main(snippets, opt)
linker.link("binary", {"cc", "cxx"}, objectfile, binaryfile, opt)
end
if opt.tryrun then
+ -- @note we use the *v variants so the binary path is not split on
+ -- whitespace by os.argv. mostly hits on Windows where TEMP lives
+ -- under the user profile and may contain spaces.
if opt.output then
- local output = os.iorun(binaryfile)
+ local output = os.iorunv(binaryfile)
if output then
output = output:trim()
end
return true, output
else
- os.vrun(binaryfile)
+ os.vrunv(binaryfile)
end
end
local binary_match = opt.binary_match