CMP0028: Report the target whose link interface has an offending item

Previously items linked via the link interface of a dependency were
reported in CMP0028 messages as if directly linked by a target.
Clarify the messages to indicate that an offending item is actually
in the link interface of a given target, regardless of its consumer.

Move the check to the end of generation and look through the final set
of link implementations and link interfaces that were used for
generation.  This avoids repeating messages on link interfaces that
have multiple consumers.
This commit is contained in:
Brad King
2021-12-16 12:42:29 -05:00
parent a97c92e46e
commit ea050286e7
11 changed files with 175 additions and 59 deletions
+5
View File
@@ -193,6 +193,11 @@ public:
return this->GeneratorTargets;
}
const GeneratorTargetVector& GetOwnedImportedGeneratorTargets() const
{
return this->OwnedImportedGeneratorTargets;
}
void AddGeneratorTarget(std::unique_ptr<cmGeneratorTarget> gt);
void AddImportedGeneratorTarget(cmGeneratorTarget* gt);
void AddOwnedImportedGeneratorTarget(std::unique_ptr<cmGeneratorTarget> gt);