summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/global.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-05-26 10:19:43 +0800
committerruki <[email protected]>2015-05-26 10:19:43 +0800
commitf4562609df7ac3f395e5178e76fcefa2c1ffa980 (patch)
tree526caad47b590de1be57996ee19b28d4e34d082a /xmake/scripts/base/global.lua
parent49ae120e090b2d4dd15e486ade2dfc2ea1ded440 (diff)
probe configure for macosx
Diffstat (limited to 'xmake/scripts/base/global.lua')
-rw-r--r--xmake/scripts/base/global.lua19
1 files changed, 16 insertions, 3 deletions
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