summaryrefslogtreecommitdiff
path: root/xmake/actions/build/check.lua
diff options
context:
space:
mode:
authorShifftC <[email protected]>2025-09-24 11:04:24 +0200
committerShifftC <[email protected]>2025-09-29 11:24:56 +0200
commit68501abaad6a9e8a99c058fe8c4986fb4cd4e08c (patch)
tree8091ff64f556cadcc1b139fee0bed6acb32fe1da /xmake/actions/build/check.lua
parent1bb954e2d8294c4813f216bd20153f9eccf53adc (diff)
move check message function to shared module
Diffstat (limited to 'xmake/actions/build/check.lua')
-rw-r--r--xmake/actions/build/check.lua24
1 files changed, 2 insertions, 22 deletions
diff --git a/xmake/actions/build/check.lua b/xmake/actions/build/check.lua
index 24f13e2f8..2ec3ebc85 100644
--- a/xmake/actions/build/check.lua
+++ b/xmake/actions/build/check.lua
@@ -22,27 +22,7 @@
import("core.base.option")
import("core.project.project")
import("private.check.checker")
-
-function _show(str, opt)
- opt = opt or {}
- _g.showed = _g.showed or {}
- local showed = _g.showed
- local infostr
- if str and opt.sourcetips then
- infostr = string.format("%s${clear}: %s", opt.sourcetips, str)
- elseif opt.sourcetips and opt.apiname and opt.value ~= nil then
- infostr = string.format("%s${clear}: unknown %s value '%s'", opt.sourcetips, opt.apiname, opt.value)
- elseif str then
- infostr = string.format("${clear}: %s", str)
- end
- if opt.probable_value then
- infostr = string.format("%s, it may be '%s'", infostr, opt.probable_value)
- end
- if not showed[infostr] then
- wprint(infostr)
- showed[infostr] = true
- end
-end
+import("private.check.show")
function main(targetnames, opt)
opt = opt or {}
@@ -70,7 +50,7 @@ function main(targetnames, opt)
if (info.build and opt.build) or (info.build_failure and opt.build_failure) then
local check = import("private.check.checkers." .. name, {anonymous = true})
for _, target in ipairs(targets) do
- check({target = target, show = _show})
+ check({target = target, show = show.wshow})
end
end
end