summaryrefslogtreecommitdiff
path: root/xmake/scripts
diff options
context:
space:
mode:
authorruki <[email protected]>2015-05-25 19:02:07 +0800
committerruki <[email protected]>2015-05-25 19:02:07 +0800
commit49ae120e090b2d4dd15e486ade2dfc2ea1ded440 (patch)
tree08e7ad4038474f68f50c7fa4df79cb1179eb0737 /xmake/scripts
parentba21449bbe648132975f6c52b3665db4c6aefad2 (diff)
merge global to the local configure
Diffstat (limited to 'xmake/scripts')
-rw-r--r--xmake/scripts/base/config.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/scripts/base/config.lua b/xmake/scripts/base/config.lua
index ca6420e81..2e64e2430 100644
--- a/xmake/scripts/base/config.lua
+++ b/xmake/scripts/base/config.lua
@@ -27,6 +27,7 @@ local config = config or {}
local io = require("base/io")
local utils = require("base/utils")
local option = require("base/option")
+local global = require("base/global")
local preprocessor = require("base/preprocessor")
-- save object with the level
@@ -143,7 +144,14 @@ function config._make()
current.target = options.target or options._DEFAULTS.target
assert(current.target)
- -- get configs from all targets first
+ -- get configs from the global configure first
+ if global._CURRENT then
+ for k, v in pairs(global._CURRENT) do
+ current[k] = v
+ end
+ end
+
+ -- get configs from all targets
for k, v in pairs(configs) do
if type(k) == "string" and not k:startswith("_") then
current[k] = v