diff options
| author | ruki <[email protected]> | 2016-04-05 20:59:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-04-05 20:59:09 +0800 |
| commit | 17cef33022bf3308ebd03546ab65464f9390e69c (patch) | |
| tree | adf735a77bfbfa87a1c08d121f1348062e84dfb2 /xmake/core/project/config.lua | |
| parent | 444f3f3f9e9dabf46da999d6d8d6f200c672a866 (diff) | |
impl auto rebuild for config
Diffstat (limited to 'xmake/core/project/config.lua')
| -rw-r--r-- | xmake/core/project/config.lua | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/xmake/core/project/config.lua b/xmake/core/project/config.lua index 761855011..b43584f83 100644 --- a/xmake/core/project/config.lua +++ b/xmake/core/project/config.lua @@ -151,16 +151,28 @@ function config.save(targetname) results.__version = xmake._VERSION -- update options for the given target - local target = results + local target = nil if targetname ~= "all" then - -- get target - target = results._TARGETS or {} - results._TARGETS = target + -- the targets + local targets = results._TARGETS or {} + results._TARGETS = targets + + -- clear target and get it + targets[targetname] = {} + target = targets[targetname] + else + + -- the targets + local targets = results._TARGETS + + -- clear the root target and get it + results = {_TARGETS = targets} + target = results end - -- update it + -- update target for name, value in pairs(config.options()) do target[name] = value end |
