diff options
| author | ruki <[email protected]> | 2018-02-07 22:40:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-02-07 10:02:01 +0800 |
| commit | ffcaa17712fa94c1c45b3e029aace073e955a372 (patch) | |
| tree | 00e5fdc69b9a2ec793764de5655500c784b199c8 | |
| parent | 315793c730d58662ae98375552d2c817c83f77c5 (diff) | |
remove unused codes and improve menuconfig
| -rw-r--r-- | xmake/actions/config/menuconf.lua | 12 | ||||
| -rw-r--r-- | xmake/core/project/option.lua | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/xmake/actions/config/menuconf.lua b/xmake/actions/config/menuconf.lua index 7a071cdff..dba1e0409 100644 --- a/xmake/actions/config/menuconf.lua +++ b/xmake/actions/config/menuconf.lua @@ -142,6 +142,9 @@ function app:_make_configs_by_category(root, options_by_category, cache, get_opt -- get option info local info = get_option_info(opt) + -- new value? + local newvalue = true + -- load value local value = nil if cache then @@ -154,6 +157,9 @@ function app:_make_configs_by_category(root, options_by_category, cache, get_opt end end end + if value ~= nil then + newvalue = false + end end -- find the menu index in subconfigs @@ -170,11 +176,11 @@ function app:_make_configs_by_category(root, options_by_category, cache, get_opt -- insert config before all sub-menus if info.kind == "string" then - table.insert(subconfigs, menu_index, menuconf.string {name = info.name, value = value, default = info.default, path = config_path, description = info.description, sourceinfo = info.sourceinfo}) + table.insert(subconfigs, menu_index, menuconf.string {name = info.name, value = value, new = newvalue, default = info.default, path = config_path, description = info.description, sourceinfo = info.sourceinfo}) elseif info.kind == "boolean" then - table.insert(subconfigs, menu_index, menuconf.boolean {name = info.name, value = value, default = info.default, path = config_path, description = info.description, sourceinfo = info.sourceinfo}) + table.insert(subconfigs, menu_index, menuconf.boolean {name = info.name, value = value, new = newvalue, default = info.default, path = config_path, description = info.description, sourceinfo = info.sourceinfo}) elseif info.kind == "choice" then - table.insert(subconfigs, menu_index, menuconf.choice {name = info.name, value = value, default = info.default, path = config_path, values = info.values, description = info.description, sourceinfo = info.sourceinfo}) + table.insert(subconfigs, menu_index, menuconf.choice {name = info.name, value = value, new = newvalue, default = info.default, path = config_path, values = info.values, description = info.description, sourceinfo = info.sourceinfo}) end end end diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index 7d5b820c2..468e402e0 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -133,9 +133,6 @@ function option:_cx_check() -- check it local ok, results_or_errors = sandbox.load(self._check_cxsnippets, snippets, {target = self, sourcekind = sourcekind, types = types, funcs = funcs, includes = includes}) - if self:name() == "zlib" then - print("zlib", ok, results_or_errors) - end if not ok then return false, results_or_errors end |
