summaryrefslogtreecommitdiff
path: root/xmake/modules/lib
diff options
context:
space:
mode:
authorruki <[email protected]>2021-09-25 21:57:16 +0800
committerruki <[email protected]>2021-09-25 21:57:16 +0800
commit697d7cc20e1e2914e72e396cf3158d9893a04e66 (patch)
tree37aa610373d521a5768ab53bf8fe8f5bd925724f /xmake/modules/lib
parent50eeea59ecee08e93e2c69929d12fa6953b92855 (diff)
improve error tips for package
Diffstat (limited to 'xmake/modules/lib')
-rw-r--r--xmake/modules/lib/detect/check_cxsnippets.lua8
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 5352301b0..ea0e941d3 100644
--- a/xmake/modules/lib/detect/check_cxsnippets.lua
+++ b/xmake/modules/lib/detect/check_cxsnippets.lua
@@ -143,9 +143,9 @@ end
-- @return true or false
--
-- @code
--- local ok = check_cxsnippets("void test() {}")
--- local ok = check_cxsnippets({"void test(){}", "#define TEST 1"}, {types = "wchar_t", includes = "stdio.h"})
--- local ok = check_cxsnippets({snippet_name = "void test(){}", "#define TEST 1"}, {types = "wchar_t", includes = "stdio.h"})
+-- local ok, output_or_errors = check_cxsnippets("void test() {}")
+-- local ok, output_or_errors = check_cxsnippets({"void test(){}", "#define TEST 1"}, {types = "wchar_t", includes = "stdio.h"})
+-- local ok, output_or_errors = check_cxsnippets({snippet_name = "void test(){}", "#define TEST 1"}, {types = "wchar_t", includes = "stdio.h"})
-- @endcode
--
function main(snippets, opt)
@@ -265,6 +265,6 @@ function main(snippets, opt)
if errors and option.get("diagnosis") and #tostring(errors) > 0 then
cprint("${color.warning}checkinfo:${clear dim} %s", errors)
end
- return ok, output
+ return ok, ok and output or errors
end