summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/global.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-04 22:28:15 +0800
committerruki <[email protected]>2015-06-04 22:28:24 +0800
commit44fd11396d7b073e6b5227894c5db02b3585302f (patch)
treed755e4b6bd6c910559a3cb72dd32cd5d0d0e3f7c /xmake/scripts/base/global.lua
parentf0f9b217ddb81084a411d09a4a23292716b20c46 (diff)
impl auto rebuild and fix some bug
Diffstat (limited to 'xmake/scripts/base/global.lua')
-rw-r--r--xmake/scripts/base/global.lua21
1 files changed, 12 insertions, 9 deletions
diff --git a/xmake/scripts/base/global.lua b/xmake/scripts/base/global.lua
index 2b3582a23..5b2f774f5 100644
--- a/xmake/scripts/base/global.lua
+++ b/xmake/scripts/base/global.lua
@@ -269,18 +269,21 @@ function global.loadxconf()
end
end
- -- merge xmake._OPTIONS._DEFAULTS to the global configure
- for k, v in pairs(options._DEFAULTS) do
+ -- merge the default global configure options to the global configure
+ local defaults = option.defaults("global")
+ if defaults then
+ for k, v in pairs(defaults) do
- -- check
- assert(type(k) == "string")
+ -- check
+ assert(type(k) == "string")
- -- need configure it?
- if global._need(k) then
+ -- need configure it?
+ if global._need(k) then
- -- save the default option
- if not configs[k] then
- configs[k] = v
+ -- save the default option
+ if not configs[k] then
+ configs[k] = v
+ end
end
end
end