diff options
| -rw-r--r-- | xmake/modules/detect/tools/find_cl.lua | 11 |
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 |
