diff options
| author | ruki <[email protected]> | 2016-04-04 17:30:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-04-04 17:30:26 +0800 |
| commit | fedf748ddd3353f6065dc2502eaec2e396bc2c2a (patch) | |
| tree | 28d1794396831d5b40c6e7554837372632873f0c /xmake/actions/global/xmake.lua | |
| parent | 70e2500e9a37a57622c7b4875171e6f07fd523ae (diff) | |
reimpl config
Diffstat (limited to 'xmake/actions/global/xmake.lua')
| -rwxr-xr-x | xmake/actions/global/xmake.lua | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/xmake/actions/global/xmake.lua b/xmake/actions/global/xmake.lua index 35b36cda6..748866e27 100755 --- a/xmake/actions/global/xmake.lua +++ b/xmake/actions/global/xmake.lua @@ -34,6 +34,9 @@ task("global") import("core.project.global") -- load configure + -- + -- priority: option > config_check > global_cache > option_default + -- global.load() -- clean the cached configure? @@ -43,13 +46,6 @@ task("global") global.clean() end - -- override the configure for the current options - for name, value in pairs(option.options()) do - if name ~= "verbose" and name ~= "clean" then - global.set(name, value) - end - end - -- merge the default options for name, value in pairs(option.defaults()) do if name ~= "verbose" and name ~= "clean" and global.get(name) == nil then @@ -57,9 +53,16 @@ task("global") end end - -- probe the configure with value: "auto" + -- override the checked configure global.probe() + -- override the option configure + for name, value in pairs(option.options()) do + if name ~= "verbose" and name ~= "clean" then + global.set(name, value) + end + end + -- save it global.save() |
