summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-07-08 22:46:34 +0800
committerruki <[email protected]>2024-07-08 22:46:34 +0800
commita80dac0cbe3d3259b14a78738ef9bd1e1134a028 (patch)
treefc80bc17958bdc21364811536cb6ba7754c94ba0
parent945195e1a2b35908cbec1bd1fa16f84683903545 (diff)
fix find_cl version
-rw-r--r--xmake/modules/detect/tools/find_cl.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/xmake/modules/detect/tools/find_cl.lua b/xmake/modules/detect/tools/find_cl.lua
index 350f15c86..9894a79d9 100644
--- a/xmake/modules/detect/tools/find_cl.lua
+++ b/xmake/modules/detect/tools/find_cl.lua
@@ -57,9 +57,14 @@ function main(opt)
-- find program version
local version = nil
if program and opt and opt.version then
- opt.command = opt.command or function () local _, info = os.iorunv(program, {}, {envs = opt.envs}); return info end
- opt.parse = opt.parse or function (output) return output:match("Version (%d+%.?%d*%.?%d*.-)%s") end
- version = find_programver(program, opt)
+ opt.command = opt.command or function ()
+ local _, info = os.iorunv(program, {}, {envs = opt.envs})
+ return info
+ end
+ opt.parse = opt.parse or function (output)
+ return output:match("(%d+%.%d+%.%d*.-)%s")
+ end
+ version = find_programver(program, opt)
end
return program, version
end