summaryrefslogtreecommitdiff
path: root/xmake/scripts/base
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/base')
-rw-r--r--xmake/scripts/base/project.lua7
-rw-r--r--xmake/scripts/base/utils.lua13
2 files changed, 6 insertions, 14 deletions
diff --git a/xmake/scripts/base/project.lua b/xmake/scripts/base/project.lua
index 19da97029..bad0e215f 100644
--- a/xmake/scripts/base/project.lua
+++ b/xmake/scripts/base/project.lua
@@ -419,12 +419,7 @@ function project._make_options(configs)
end
-- trace
- utils.verbose("checking %s ...: %s", k, utils.ifelse(o, "ok", "no"))
-
- else
-
- -- trace
- utils.verbose("checking %s ...: %s", k, "ok")
+ utils.verbose("checking for %s ... %s", k, utils.ifelse(o, "ok", "no"))
end
end
end
diff --git a/xmake/scripts/base/utils.lua b/xmake/scripts/base/utils.lua
index bbbc802ac..58ec6ba60 100644
--- a/xmake/scripts/base/utils.lua
+++ b/xmake/scripts/base/utils.lua
@@ -208,19 +208,15 @@ function utils.unique(array)
end
-- call functions
-function utils.call(self, funcs, pred, ...)
+function utils.call(funcs, pred, ...)
-- check
- assert(self and funcs and type(funcs) == "table")
+ assert(funcs)
-- call all
- for _, name in ipairs(funcs) do
+ for _, func in ipairs(utils.wrap(funcs)) do
-- check
- assert(type(name) == "string")
-
- -- get function
- local func = self[name]
assert(type(func) == "function")
-- call it
@@ -229,7 +225,8 @@ function utils.call(self, funcs, pred, ...)
-- exists predicate?
if pred and type(pred) == "function" then
if not pred(name, result) then break end
- end
+ -- failed?
+ elseif not result then break end
end
end