diff options
| author | ruki <[email protected]> | 2015-06-05 11:41:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-05 11:41:23 +0800 |
| commit | 9c4c565ef5cba3c668b338ed0066cff0d58e8caa (patch) | |
| tree | 1976b7ca1c84e29d4a812a67f46834cd1fa98b57 /xmake/scripts/base/global.lua | |
| parent | 4fd209354ecf8a6f90b5a19a18e2268e3c9d649f (diff) | |
clearup config and global
Diffstat (limited to 'xmake/scripts/base/global.lua')
| -rw-r--r-- | xmake/scripts/base/global.lua | 24 |
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() |
