From f4562609df7ac3f395e5178e76fcefa2c1ffa980 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 26 May 2015 10:19:43 +0800 Subject: probe configure for macosx --- xmake/scripts/base/config.lua | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'xmake/scripts/base/config.lua') diff --git a/xmake/scripts/base/config.lua b/xmake/scripts/base/config.lua index 2e64e2430..e6b4dbfdd 100644 --- a/xmake/scripts/base/config.lua +++ b/xmake/scripts/base/config.lua @@ -207,6 +207,23 @@ function config.get(name) return config._CURRENT[name] end +-- set the given configure to the current +function config.set(name, value) + + -- check + assert(config._CURRENT and name and value) + + -- get the current target + local target = config._target() + assert(target) + + -- set it to the current target configure for saving to file + target[name] = value + + -- set it to the current configure + config._CURRENT[name] = value +end + -- save xmake.xconf function config.savexconf() @@ -340,9 +357,7 @@ function config.dump() assert(config._CURRENT) -- dump - if xmake._OPTIONS.verbose then - utils.dump(config._CURRENT) - end + utils.dump(config._CURRENT) end -- cgit v1.3.1