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/core/project/project.lua | |
| parent | 70e2500e9a37a57622c7b4875171e6f07fd523ae (diff) | |
reimpl config
Diffstat (limited to 'xmake/core/project/project.lua')
| -rw-r--r-- | xmake/core/project/project.lua | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index 6a98df001..eaa8a74e1 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -504,32 +504,23 @@ function project.probe() -- make all options for name, opt in pairs(options) do - -- this option need be probed automatically? - if config.get(name) == nil then - - -- check option - if opt:check(cfile, cxxfile, objectfile, targetfile) then - - -- enable this option - config.set(name, true) - - -- save this option to configure - opt:save() + -- check option + if opt:check(cfile, cxxfile, objectfile, targetfile) then - else + -- enable this option + config.set(name, true) - -- disable this option - config.set(name, false) + -- save this option to configure + opt:save() - -- clear this option to configure - opt:clear() + else - end + -- disable this option + config.set(name, false) - elseif nil == option.load(name) then + -- clear this option to configure + opt:clear() - -- save this option to configure - opt:save() end end |
