mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 22:37:30 +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:
@@ -1806,13 +1806,10 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
|
||||
this->WriteCustomRuleCSharp(e0, c, name, script, additional_inputs.str(),
|
||||
outputs.str(), comment, ccg);
|
||||
} else {
|
||||
this->WriteCustomRuleCpp(
|
||||
*spe2, c, script, additional_inputs.str(), outputs.str(), comment, ccg,
|
||||
symbolic,
|
||||
(command.GetUsesTerminal() ||
|
||||
(command.HasMainDependency() && source->GetIsGenerated()))
|
||||
? BuildInParallel::No
|
||||
: BuildInParallel::Yes);
|
||||
// FIXME(#18405): Enable BuildInParallel::Yes via an option or policy.
|
||||
this->WriteCustomRuleCpp(*spe2, c, script, additional_inputs.str(),
|
||||
outputs.str(), comment, ccg, symbolic,
|
||||
BuildInParallel::No);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user