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/global.lua | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'xmake/scripts/base/global.lua') diff --git a/xmake/scripts/base/global.lua b/xmake/scripts/base/global.lua index c50fa70cf..0a6b93042 100644 --- a/xmake/scripts/base/global.lua +++ b/xmake/scripts/base/global.lua @@ -136,6 +136,21 @@ function global.get(name) return global._CURRENT[name] end +-- set the given configure to the current +function global.set(name, value) + + -- check + assert(global._CURRENT and global._CONFIGS) + assert(name and value) + + -- set it to the current configure + global._CURRENT[name] = value + + -- set it to the configure for saving to file + global._CONFIGS[name] = value + +end + -- save xmake.xconf function global.savexconf() @@ -248,9 +263,7 @@ function global.dump() assert(global._CURRENT) -- dump - if xmake._OPTIONS.verbose then - utils.dump(global._CURRENT) - end + utils.dump(global._CURRENT) end -- cgit v1.3.1