diff options
| author | ruki <[email protected]> | 2015-06-04 16:47:21 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-04 16:47:21 +0800 |
| commit | f0f9b217ddb81084a411d09a4a23292716b20c46 (patch) | |
| tree | 9938fe976101be940f2f4234d911868c8aa0e7a4 /xmake/scripts/base/config.lua | |
| parent | c17f9ed42c8529f3ff724e0d0614b99eac6374c0 (diff) | |
skip the clean option
Diffstat (limited to 'xmake/scripts/base/config.lua')
| -rw-r--r-- | xmake/scripts/base/config.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/xmake/scripts/base/config.lua b/xmake/scripts/base/config.lua index 05edfc555..6c8a22f58 100644 --- a/xmake/scripts/base/config.lua +++ b/xmake/scripts/base/config.lua @@ -181,6 +181,11 @@ function config._file() return config.directory() .. "/xmake.xconf" end +-- need configure? +function config._need(name) + return name and name ~= "target" and name ~= "file" and name ~= "project" and name ~= "verbose" and name ~= "clean" +end + -- get the current target scope function config._target() @@ -301,7 +306,7 @@ function config.loadxconf() local configures = {} for _, o in ipairs(option._MENU.config.options) do local name = o[2] - if name and name ~= "target" and name ~= "file" and name ~= "project" and name ~= "verbose" then + if config._need(name) then configures[i] = name i = i + 1 end @@ -365,7 +370,7 @@ function config.loadxconf() assert(type(k) == "string") -- skip some options - if not k:startswith("_") and k ~= "project" and k ~= "file" and k ~= "verbose" and k ~= "target" then + if not k:startswith("_") and config._need(k) then -- save the option to the target target[k] = v @@ -379,7 +384,7 @@ function config.loadxconf() assert(type(k) == "string") -- skip some options - if k ~= "project" and k ~= "file" and k ~= "verbose" and k ~= "target" then + if config._need(k) then -- save the default option to the target if not target[k] then |
