diff options
| author | ruki <[email protected]> | 2017-09-22 00:40:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-09-21 22:04:55 +0800 |
| commit | ab5456ca3457c7b59de6cc590068d91d7749d096 (patch) | |
| tree | 329742618ea8ef110542f27fa48f4226a20dde9c /xmake/modules/lib | |
| parent | 034185734b5bc91f8188c15c9e02b0ce8ebaa850 (diff) | |
modify find_program interface
Diffstat (limited to 'xmake/modules/lib')
| -rw-r--r-- | xmake/modules/lib/detect/find_tool.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xmake/modules/lib/detect/find_tool.lua b/xmake/modules/lib/detect/find_tool.lua index f2d5af68c..964d687ea 100644 --- a/xmake/modules/lib/detect/find_tool.lua +++ b/xmake/modules/lib/detect/find_tool.lua @@ -43,7 +43,9 @@ end -- find tool -- -- @param name the tool name --- @param opt the options, .e.g {program = "xcrun -sdk macosx clang", pathes = {"/usr/bin"}, check = function (tool) os.run("%s -h", tool) end, version = true} +-- @param opt the options, .e.g {program = "xcrun -sdk macosx clang", pathes = {"/usr/bin"}, +-- check = function (tool) os.run("%s -h", tool) end, version = true +-- force = true, cachekey = "xxx"} -- -- @return {name = "", program = "", version = ""} or nil -- @@ -81,7 +83,7 @@ function main(name, opt) end -- find tool - local program = find_program(opt.program, opt.pathes, opt.check) + local program = find_program(opt.program, opt.pathes, opt.check, opt) if not program then return end @@ -89,7 +91,7 @@ function main(name, opt) -- find tool version local version = nil if program and opt.version then - version = find_programver(program) + version = find_programver(program, opt) end -- ok? |
