diff options
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/package/tools/msbuild.lua | 2 |
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 |
