mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-25 15:49:08 -05:00
VS: Do not concurrently build custom commands with generated MAIN_DEPENDENCY
Since commit 33c15ae2b9 (VS: Build custom commands concurrently when
possible, 2023-01-19) several tests have failed intermittently with the
VS generator. It seems that if the `BuildInParallel` setting is
attached to a generated input:
<CustomBuild Include="generated_input.txt">
<BuildInParallel Condition="...">true</BuildInParallel>
<Command Condition="...">copy geneated_input.txt output.txt</Command>
...
</CustomBuild>
then MSBuild does not wait for the input to be generated before running
the command.
This occurs when using `add_custom_command`'s `MAIN_DEPENDENCY`, so
avoid using `BuildInParallel` in that case.
Issue: #18405
This commit is contained in:
@@ -152,13 +152,18 @@ private:
|
||||
void OutputLinkIncremental(Elem& e1, std::string const& configName);
|
||||
void WriteCustomRule(Elem& e0, cmSourceFile const* source,
|
||||
cmCustomCommand const& command);
|
||||
enum class BuildInParallel
|
||||
{
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
void WriteCustomRuleCpp(Elem& e2, std::string const& config,
|
||||
std::string const& script,
|
||||
std::string const& additional_inputs,
|
||||
std::string const& outputs,
|
||||
std::string const& comment,
|
||||
cmCustomCommandGenerator const& ccg, bool symbolic,
|
||||
bool uses_terminal);
|
||||
BuildInParallel buildInParallel);
|
||||
void WriteCustomRuleCSharp(Elem& e0, std::string const& config,
|
||||
std::string const& commandName,
|
||||
std::string const& script,
|
||||
|
||||
Reference in New Issue
Block a user