diff options
| -rw-r--r-- | xmake/modules/package/tools/msbuild.lua | 6 |
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 |
