diff options
| author | ruki <[email protected]> | 2024-07-22 21:18:28 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-07-22 21:18:28 +0800 |
| commit | 45852e6ffcd3f043d961574e72f40d287a2898ab (patch) | |
| tree | 74f5315ddab67d11d5c13b47578ad7d4a62d68ce | |
| parent | af5c479c7fc1eecf540b3e930b250a79ca34f19c (diff) | |
| parent | 1ff455b2c0ce5959118476ff940f32d5edf1bc88 (diff) | |
Merge pull request #5373 from ChrisCatCP/msbuild
update msbuild.lua
| -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 |
