diff options
| author | ruki <[email protected]> | 2024-09-16 22:46:32 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-09-16 22:46:32 +0800 |
| commit | 7bbe3c949207aa7a769dcdaabb0637a86739bde8 (patch) | |
| tree | d6f0d9fe81f94131160e2690570fe95b4a37e086 | |
| parent | f9196dfa7073e3c3511230072d606c89f28a075d (diff) | |
add policy for xrepo/install
| -rw-r--r-- | xmake/modules/private/xrepo/action/install.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/modules/private/xrepo/action/install.lua b/xmake/modules/private/xrepo/action/install.lua index 0c65773b0..bffd7343b 100644 --- a/xmake/modules/private/xrepo/action/install.lua +++ b/xmake/modules/private/xrepo/action/install.lua @@ -46,6 +46,7 @@ function menu_options() {nil, "includes", "kv", nil, "Includes extra lua configuration files.", "e.g.", " - xrepo install -p cross --toolchain=mytool --includes='toolchain1.lua" .. path.envsep() .. "toolchain2.lua'"}, + {nil, "policies", "kv", nil, "Set the policies." }, {category = "Visual Studio SDK Configuration" }, {nil, "vs", "kv", nil, "The Microsoft Visual Studio" , " e.g. --vs=2017" }, @@ -178,6 +179,10 @@ function _install_packages(packages) table.insert(config_argv, "-k") table.insert(config_argv, kind) end + local policies = option.get("policies") + if policies then + table.insert(config_argv, "--policies=" .. policies) + end -- for android if option.get("ndk") then table.insert(config_argv, "--ndk=" .. option.get("ndk")) |
