1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-17 07:11:52 +08:00

VS: Revert "Build custom commands concurrently when possible"

Since commit 33c15ae2b9 (VS: Build custom commands concurrently when
possible, 2023-01-19, v3.26.0-rc1~56^2) we add `BuildInParallel` to
custom commands in `.vcxproj` files.  However, this can break existing
projects that implicitly rely on serial execution of custom commands.
For example, custom commands in our FindCUDA module run MSVC (via nvcc)
with a common `vc*.pdb` file, and therefore cannot run in parallel.

Revert use of `BuildInParallel` while leaving most of the infrastructure
for it in place.  It can be restored later with an option or policy.

Fixes: #24576
Issue: #18405
This commit is contained in:
Brad King
2023-03-07 14:03:02 -05:00
parent 5f4dad37f0
commit abb1c12162

View File

@@ -1806,13 +1806,10 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
this->WriteCustomRuleCSharp(e0, c, name, script, additional_inputs.str(), this->WriteCustomRuleCSharp(e0, c, name, script, additional_inputs.str(),
outputs.str(), comment, ccg); outputs.str(), comment, ccg);
} else { } else {
this->WriteCustomRuleCpp( // FIXME(#18405): Enable BuildInParallel::Yes via an option or policy.
*spe2, c, script, additional_inputs.str(), outputs.str(), comment, ccg, this->WriteCustomRuleCpp(*spe2, c, script, additional_inputs.str(),
symbolic, outputs.str(), comment, ccg, symbolic,
(command.GetUsesTerminal() || BuildInParallel::No);
(command.HasMainDependency() && source->GetIsGenerated()))
? BuildInParallel::No
: BuildInParallel::Yes);
} }
} }
} }