summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
author白喵 <[email protected]>2024-07-25 16:47:17 +0800
committer白喵 <[email protected]>2024-07-25 16:47:17 +0800
commitfb38aef96ba744788c5dffdee38a4f818ba9e945 (patch)
tree6d938de66f0311938db01a4f0ca1fe6263fb3ea7 /xmake/modules
parenta066a32e9c668967fb11486e77f92b11c1a22f5d (diff)
update policy
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/package/tools/cmake.lua2
-rw-r--r--xmake/modules/package/tools/msbuild.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index b4337c4f7..77c0f6228 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -1077,7 +1077,7 @@ function _get_cmake_generator(package, opt)
opt = opt or {}
local cmake_generator = opt.cmake_generator
if not cmake_generator then
- if project.policy("package.cmake_generator.ninja") then
+ if project.policy("package.cmake_generator.ninja") or package:policy("package.cmake_generator.ninja") then
cmake_generator = "Ninja"
end
if not cmake_generator then
diff --git a/xmake/modules/package/tools/msbuild.lua b/xmake/modules/package/tools/msbuild.lua
index 3ab9e76a2..c46e76479 100644
--- a/xmake/modules/package/tools/msbuild.lua
+++ b/xmake/modules/package/tools/msbuild.lua
@@ -65,7 +65,7 @@ function _get_configs(package, configs, opt)
if not configs_str:find("p:Platform=", 1, true) then
table.insert(configs, "-p:Platform=" .. _get_vsarch(package))
end
- if project.policy("package.msbuild.multi_tool_task") then
+ if project.policy("package.msbuild.multi_tool_task") or package:policy("package.msbuild.multi_tool_task") then
table.insert(configs, "/p:UseMultiToolTask=true")
table.insert(configs, "/p:EnforceProcessCountAcrossBuilds=true")
if jobs then