diff options
| author | ruki <[email protected]> | 2017-05-16 18:05:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-16 18:05:14 +0800 |
| commit | 6bd14e6b5269856ac468b03e7e820d9e952b42c1 (patch) | |
| tree | f5bf6412e3ecb39ef1247999b795c4140e5ade21 /xmake/modules/lib/detect | |
| parent | cd09a4bc9a4a780cd857fff34444a00583de42ab (diff) | |
add find_program and impl find_ccache
Diffstat (limited to 'xmake/modules/lib/detect')
| -rw-r--r-- | xmake/modules/lib/detect/find_ccache.lua | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/xmake/modules/lib/detect/find_ccache.lua b/xmake/modules/lib/detect/find_ccache.lua index 66338da2a..b90856c19 100644 --- a/xmake/modules/lib/detect/find_ccache.lua +++ b/xmake/modules/lib/detect/find_ccache.lua @@ -23,17 +23,11 @@ -- -- imports -import("lib.detect.find_file") +import("lib.detect.find_program") -- find ccache --- --- @param ... detected dirs, files, regs --- --- @return {shellname = ... , fullpath = ...} or nil --- -function main(...) - - -- TODO - print("ccache") - find_file() +function main() + return find_program("ccache", { "/usr/bin", + "/usr/local/bin"} + , function (program) os.run("%s -h", program) end) end |
