From 49ae120e090b2d4dd15e486ade2dfc2ea1ded440 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 25 May 2015 19:02:07 +0800 Subject: merge global to the local configure --- xmake/scripts/base/config.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'xmake/scripts/base') 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 -- cgit v1.3.1