summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-16 14:38:41 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-16 14:38:41 (GMT)
commit48db261e69c37cd9504c27dcee952d651f7ac43b (patch)
tree49d5e554c4378973ffde3e8136437d3c95146966
parentd59f861e4224271e5cb3d4852ac18f067b86994c (diff)
downloadCMake-48db261e69c37cd9504c27dcee952d651f7ac43b.zip
CMake-48db261e69c37cd9504c27dcee952d651f7ac43b.tar.gz
CMake-48db261e69c37cd9504c27dcee952d651f7ac43b.tar.bz2
cmake --build: Use both inter- and intra-project parallelism with msbuild
Since commit 1ab3881ec9 (cmake: Add options for parallel builds to --build mode, 2018-04-14, v3.12.0-rc1~42^2), `cmake --build --parallel` has added two options to the msbuild command line: * `/m` enables inter-project parallelism in msbuild. * `/p:CL_MPCount=1` suppresses intra-project parallelism in cl. The latter was used to avoid `O(N^2)` compilation threads on `N` processors. In practice however, projects often have many source files in a few targets, so `--parallel` actually reduces parallelism. Drop the latter option to restore intra-project parallelism. Users can always add `-- /p:CL_MPCount=1` themselves. Fixes: #20564
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx2
1 files changed, 0 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index d6d808d..266e08d 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -1155,8 +1155,6 @@ cmGlobalVisualStudio10Generator::GenerateBuildCommand(
} else {
makeCommand.Add(cmStrCat("/m:", std::to_string(jobs)));
}
- // Having msbuild.exe and cl.exe using multiple jobs is discouraged
- makeCommand.Add("/p:CL_MPCount=1");
}
// Respect the verbosity: 'n' normal will show build commands