diff options
| author | ruki <[email protected]> | 2022-11-24 22:30:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-11-24 22:30:28 +0800 |
| commit | b4571d58c1618cd26d3fb9b0be610ebc397c668d (patch) | |
| tree | b01e0dc9fc7e1e9e01b19c74e77cf1c99067fe11 | |
| parent | 938183e9c09c62d10485e7aa4e2b94eab2756cd3 (diff) | |
just check configs
| -rw-r--r-- | xmake/actions/config/main.lua | 11 | ||||
| -rw-r--r-- | xmake/actions/config/xmake.lua | 7 |
2 files changed, 12 insertions, 6 deletions
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index c8705d945..fc14297e5 100644 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -51,6 +51,7 @@ function _option_filter(name) , require = true , export = true , import = true + , check = true } return not options[name] end @@ -65,7 +66,7 @@ function _need_check(changed) -- clean? if not changed then - changed = option.get("clean") + changed = option.get("clean") or option.get("check") end -- check for all project files @@ -426,8 +427,12 @@ force to build in current directory via run `xmake -P .`]], os.projectdir()) local recheck = _need_check(options_changed or not configcache_loaded or autogen) if recheck then - -- clear and flush local cache to disk - localcache.clear("config") + -- clear cached configuration + if option.get("clean") then + localcache.clear("config") + end + + -- clear detection cache localcache.clear("detect") localcache.clear("option") localcache.clear("package") diff --git a/xmake/actions/config/xmake.lua b/xmake/actions/config/xmake.lua index b54066835..50c22206e 100644 --- a/xmake/actions/config/xmake.lua +++ b/xmake/actions/config/xmake.lua @@ -165,16 +165,17 @@ task("config") description = "Configure the project.", shortname = 'f', options = { - {'c', "clean", "k", nil , "Clean the cached configure and configure all again."}, + {'c', "clean", "k", nil , "Clean the cached user configs and detection cache."}, + {nil, "check", "k", nil , "Just ignore detection cache and force to check all, it will reserve the cached user configs."}, {nil, "export", "kv", nil , "Export the current configuration to the given file." , " e.g." , " - xmake f -m debug -xxx=y --export=build/config.txt"}, - {nil, "import", "kv", nil , "Import configuration from the given file." + {nil, "import", "kv", nil , "Import configs from the given file." , " e.g." , " - xmake f -import=build/config.txt"}, {nil, "menu", "k", nil , "Configure project with a menu-driven user interface."}, {category = "."}, - {'p', "plat", "kv", "auto" , "Compile for the given platform.", values = _plat_values}, + {'p', "plat", "kv", "auto" , "Compile for the given platform.", values = _plat_values}, {'a', "arch", "kv", "auto" , "Compile for the given architecture.", _arch_description, values = _arch_values}, {'m', "mode", "kv", "auto" , "Compile for the given mode.", values = _mode_values}, {'k', "kind", "kv", "static" , "Compile for the given target kind.", values = {"static", "shared", "binary"}}, |
