summaryrefslogtreecommitdiff
path: root/xmake/modules/lib
diff options
context:
space:
mode:
authorruki <[email protected]>2018-11-04 22:20:13 +0800
committerruki <[email protected]>2018-11-04 22:20:13 +0800
commitd3d05b0c620dbfc318d4c693bc2fb7b556d51d3c (patch)
treea91579ba8362498e531c01081d8fe80906da142d /xmake/modules/lib
parent9d22026291016915298cd4cf8b004bef4b6faaec (diff)
improve diagnosis info
Diffstat (limited to 'xmake/modules/lib')
-rw-r--r--xmake/modules/lib/detect/check_cxsnippets.lua8
-rw-r--r--xmake/modules/lib/detect/has_flags.lua8
2 files changed, 8 insertions, 8 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?
diff --git a/xmake/modules/lib/detect/has_flags.lua b/xmake/modules/lib/detect/has_flags.lua
index 6398e62e6..66bdcfece 100644
--- a/xmake/modules/lib/detect/has_flags.lua
+++ b/xmake/modules/lib/detect/has_flags.lua
@@ -115,11 +115,11 @@ function main(name, flags, opt)
_g._checking = nil
-- trace
- if option.get("verbose") or opt.verbose then
+ if option.get("verbose") or option.get("diagnosis") or opt.verbose then
cprint("checking for the flags(%s) %s ... %s", path.filename(tool.program), table.concat(flags, " "), ifelse(result, "${green}ok", "${red}no"))
- if errors and #errors > 0 then
- cprint("${dim red}check error:${clear}${dim} %s", errors:trim())
- end
+ end
+ if errors and #errors > 0 and option.get("diagnosis") then
+ cprint("${yellow}checkinfo:${clear dim} %s", errors:trim())
end
-- save result to cache