diff options
| author | ruki <[email protected]> | 2017-09-28 11:47:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-09-28 11:47:57 +0800 |
| commit | 603ecaeb969342384e55b1fe92ed6d55d8ea970c (patch) | |
| tree | 7229a5207e5239fee930b61465694045988dc506 | |
| parent | 4c93ae675580410bfb29364d457e129ddd6e0f8d (diff) | |
fix find_cl
| -rw-r--r-- | xmake/modules/detect/tools/find_cl.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/detect/tools/find_cl.lua b/xmake/modules/detect/tools/find_cl.lua index c7f92c8e4..bbf00cde2 100644 --- a/xmake/modules/detect/tools/find_cl.lua +++ b/xmake/modules/detect/tools/find_cl.lua @@ -43,8 +43,6 @@ function main(opt) -- init options opt = opt or {} opt.check = opt.check or function (program) os.run(program) end - opt.command = opt.command or function () local _, info = os.iorun(program); return info end - opt.parse = opt.parse or function (output) return output:match("Version (%d+%.?%d*%.?%d*.-)%s") end -- find program local program = find_program(opt.program or "cl.exe", opt) @@ -52,7 +50,9 @@ function main(opt) -- find program version local version = nil if program and opt and opt.version then - version = find_programver(program, opt) + opt.command = opt.command or function () local _, info = os.iorun(program); return info end + opt.parse = opt.parse or function (output) return output:match("Version (%d+%.?%d*%.?%d*.-)%s") end + version = find_programver(program, opt) end -- ok? |
