1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

presets: Fix buildPreset "jobs"

Fixes: #22273
This commit is contained in:
Sam Freed
2021-06-03 15:32:55 -07:00
committed by Brad King
parent 93e396b402
commit 5d67632813

View File

@@ -3164,7 +3164,9 @@ int cmake::Build(int jobs, std::string dir, std::vector<std::string> targets,
this->UnprocessedPresetEnvironment = expandedPreset->Environment;
this->ProcessPresetEnvironment();
if (jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL && expandedPreset->Jobs) {
if ((jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL ||
jobs == cmake::NO_BUILD_PARALLEL_LEVEL) &&
expandedPreset->Jobs) {
jobs = *expandedPreset->Jobs;
}