summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/global.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-05 11:41:23 +0800
committerruki <[email protected]>2015-06-05 11:41:23 +0800
commit9c4c565ef5cba3c668b338ed0066cff0d58e8caa (patch)
tree1976b7ca1c84e29d4a812a67f46834cd1fa98b57 /xmake/scripts/base/global.lua
parent4fd209354ecf8a6f90b5a19a18e2268e3c9d649f (diff)
clearup config and global
Diffstat (limited to 'xmake/scripts/base/global.lua')
-rw-r--r--xmake/scripts/base/global.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/xmake/scripts/base/global.lua b/xmake/scripts/base/global.lua
index 196cbad9c..40cb04518 100644
--- a/xmake/scripts/base/global.lua
+++ b/xmake/scripts/base/global.lua
@@ -296,6 +296,30 @@ function global.loadxconf()
global._make()
end
+-- clear up and remove all auto values
+function global.clearup()
+
+ -- clear up the current configure
+ local current = global._CURRENT
+ if current then
+ for k, v in pairs(current) do
+ if v and type(v) and v == "auto" then
+ current[k] = nil
+ end
+ end
+ end
+
+ -- clear up the configure
+ local configs = global._CONFIGS
+ if configs then
+ for k, v in pairs(configs) do
+ if v and type(v) and v == "auto" then
+ configs[k] = nil
+ end
+ end
+ end
+end
+
-- dump the current configure
function global.dump()