diff options
| author | ruki <[email protected]> | 2018-11-04 22:20:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-11-04 22:20:13 +0800 |
| commit | d3d05b0c620dbfc318d4c693bc2fb7b556d51d3c (patch) | |
| tree | a91579ba8362498e531c01081d8fe80906da142d /xmake/modules/lib/detect/check_cxsnippets.lua | |
| parent | 9d22026291016915298cd4cf8b004bef4b6faaec (diff) | |
improve diagnosis info
Diffstat (limited to 'xmake/modules/lib/detect/check_cxsnippets.lua')
| -rw-r--r-- | xmake/modules/lib/detect/check_cxsnippets.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/modules/lib/detect/check_cxsnippets.lua b/xmake/modules/lib/detect/check_cxsnippets.lua index 0cbee0153..d2e272714 100644 --- a/xmake/modules/lib/detect/check_cxsnippets.lua +++ b/xmake/modules/lib/detect/check_cxsnippets.lua @@ -197,7 +197,7 @@ function main(snippets, opt) os.tryrm(binaryfile) -- trace - if opt.verbose or option.get("verbose") then + if opt.verbose or option.get("verbose") or option.get("diagnosis") then local kind = ifelse(sourcekind == "cc", "c", "c++") if #includes > 0 then cprint("checking for the %s includes %s ... %s", kind, table.concat(includes, ", "), ifelse(ok, "${green}ok", "${red}no")) @@ -214,9 +214,9 @@ function main(snippets, opt) for _, snippet in ipairs(snippets) do cprint("checking for the %s snippet %s ... %s", kind, snippet:sub(1, 16), ifelse(ok, "${green}ok", "${red}no")) end - if errors and #errors > 0 then - cprint("${dim red}check error:${clear}${dim} %s", errors) - end + end + if errors and #errors > 0 and option.get("diagnosis") then + cprint("${yellow}checkinfo:${clear dim} %s", errors) end -- ok? |
