summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/global.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/base/global.lua')
-rw-r--r--xmake/scripts/base/global.lua15
1 files changed, 10 insertions, 5 deletions
diff --git a/xmake/scripts/base/global.lua b/xmake/scripts/base/global.lua
index 9e43213ee..2b3582a23 100644
--- a/xmake/scripts/base/global.lua
+++ b/xmake/scripts/base/global.lua
@@ -133,6 +133,11 @@ function global._file()
return global.directory() .. "/xmake.xconf"
end
+-- need configure?
+function global._need(name)
+ return name and name ~= "verbose" and name ~= "clean"
+end
+
-- get the given configure from the current
function global.get(name)
@@ -226,7 +231,7 @@ function global.loadxconf()
local configures = {}
for _, o in ipairs(option._MENU.global.options) do
local name = o[2]
- if name and name ~= "verbose" then
+ if global._need(name) then
configures[i] = name
i = i + 1
end
@@ -258,8 +263,8 @@ function global.loadxconf()
-- check
assert(type(k) == "string")
- -- skip some options
- if not k:startswith("_") and k ~= "verbose" then
+ -- need configure it?
+ if not k:startswith("_") and global._need(k) then
configs[k] = v
end
end
@@ -270,8 +275,8 @@ function global.loadxconf()
-- check
assert(type(k) == "string")
- -- skip some options
- if k ~= "verbose" then
+ -- need configure it?
+ if global._need(k) then
-- save the default option
if not configs[k] then