diff options
| author | ruki <[email protected]> | 2017-06-20 13:04:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-06-20 13:04:30 +0800 |
| commit | 763ea08c17ff6655e3128a057fb9d69017d69edf (patch) | |
| tree | cf98935fc052b992ed735f29c88f94e098aabe25 /xmake/modules/lib/detect/has_flags.lua | |
| parent | 0ef4acaa5f9d78c7fd8941ccbe8d3f237e91268c (diff) | |
fix cache bug and add verbose trace
Diffstat (limited to 'xmake/modules/lib/detect/has_flags.lua')
| -rw-r--r-- | xmake/modules/lib/detect/has_flags.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/lib/detect/has_flags.lua b/xmake/modules/lib/detect/has_flags.lua index bbd972c0d..7da2d98d8 100644 --- a/xmake/modules/lib/detect/has_flags.lua +++ b/xmake/modules/lib/detect/has_flags.lua @@ -23,6 +23,7 @@ -- -- imports +import("core.base.option") import("lib.detect.find_tool") -- has this flag? @@ -60,6 +61,11 @@ function _has_flag(name, flag, opt) result = try { function () os.runv(tool.program, {flag}); return true end } end + -- trace + if option.get("verbose") then + cprint("checking for the flags %s ... %s", flag, ifelse(result, "${green}ok", "${red}no")) + end + -- save result to cache results[key] = ifelse(result, result, false) _g._RESULTS = results |
