Commit 0b82e68f authored by Brad King's avatar Brad King

VS: Restore CMakeLists.txt references in each target

The custom command de-duplication added by commit v3.12.0-rc1~171^2 (VS:
Generate a custom command only in the least dependent target,
2018-03-23) accidentally also applied to the `CMakeLists.txt` file
reference we put in each target.  This file reference comes with a
custom command that has no dependencies and that is safe to run
repeatedly across multiple targets (via internal stamp checking).
Therefore it should be excluded from the de-duplication so that
`CMakeLists.txt` references appear in all targets for human reference.

Fixes: #18310
parent c4ab0980
...@@ -1207,7 +1207,11 @@ void cmVisualStudio10TargetGenerator::WriteCustomCommands(Elem& e0) ...@@ -1207,7 +1207,11 @@ void cmVisualStudio10TargetGenerator::WriteCustomCommands(Elem& e0)
this->GeneratorTarget->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) { this->GeneratorTarget->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
if (cmSourceFile const* sf = if (cmSourceFile const* sf =
this->LocalGenerator->CreateVCProjBuildRule()) { this->LocalGenerator->CreateVCProjBuildRule()) {
this->WriteCustomCommand(e0, sf); // Write directly rather than through WriteCustomCommand because
// we do not want the de-duplication and it has no dependencies.
if (cmCustomCommand const* command = sf->GetCustomCommand()) {
this->WriteCustomRule(e0, sf, *command);
} }
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment