diff options
| author | 白喵 <[email protected]> | 2024-07-22 13:34:59 +0800 |
|---|---|---|
| committer | 白喵 <[email protected]> | 2024-07-22 13:34:59 +0800 |
| commit | d3f4cf3871782744ebbcb0898a0c5df69d924b15 (patch) | |
| tree | aeeda3a69706bec9a5522f4c91e42ca89d1b5bca /xmake/modules/package/tools/msbuild.lua | |
| parent | ef289c5915fd1f8d770333126e0bea39ed504177 (diff) | |
refactor policy msbuild.multi_tool_task
Diffstat (limited to 'xmake/modules/package/tools/msbuild.lua')
| -rw-r--r-- | xmake/modules/package/tools/msbuild.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/msbuild.lua b/xmake/modules/package/tools/msbuild.lua index 34aa86453..e6945168e 100644 --- a/xmake/modules/package/tools/msbuild.lua +++ b/xmake/modules/package/tools/msbuild.lua @@ -20,6 +20,7 @@ -- imports import("core.base.option") +import("core.project.project") import("core.tool.toolchain") import("lib.detect.find_tool") import("private.utils.upgrade_vsproj") @@ -64,6 +65,11 @@ 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 jobs and project.policy("package.msbuild.multi_tool_task") then + table.insert(configs, "/p:UseMultiToolTask=true") + table.insert(configs, "/p:EnforceProcessCountAcrossBuilds=true") + table.insert(configs, format("/p:MultiProcMaxCount=%d", jobs)) + end return configs end |
