summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/msbuild.lua
diff options
context:
space:
mode:
author白喵 <[email protected]>2024-07-22 17:41:34 +0800
committer白喵 <[email protected]>2024-07-22 17:41:34 +0800
commit1ff455b2c0ce5959118476ff940f32d5edf1bc88 (patch)
tree99a95bb33baa9832a2555b2e5b3e4e4ae50a9bc3 /xmake/modules/package/tools/msbuild.lua
parentbcdc71d60d1896c71a057438a859d9e6f7126c80 (diff)
update msbuild.lua
Diffstat (limited to 'xmake/modules/package/tools/msbuild.lua')
-rw-r--r--xmake/modules/package/tools/msbuild.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/msbuild.lua b/xmake/modules/package/tools/msbuild.lua
index e6945168e..3ab9e76a2 100644
--- a/xmake/modules/package/tools/msbuild.lua
+++ b/xmake/modules/package/tools/msbuild.lua
@@ -65,10 +65,12 @@ 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
+ if 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))
+ if jobs then
+ table.insert(configs, format("/p:MultiProcMaxCount=%d", jobs))
+ end
end
return configs
end