summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-12-16 17:42:29 (GMT)
committerBrad King <brad.king@kitware.com>2021-12-16 21:43:17 (GMT)
commitea050286e7f4b659518bf5b6c4adbddefa3cc9a6 (patch)
tree90849ed084ad953d03d0b84eb812c5383140db55 /Source/cmGeneratorTarget.h
parenta97c92e46eff516eb4642776dcf85bd646e63763 (diff)
downloadCMake-ea050286e7f4b659518bf5b6c4adbddefa3cc9a6.zip
CMake-ea050286e7f4b659518bf5b6c4adbddefa3cc9a6.tar.gz
CMake-ea050286e7f4b659518bf5b6c4adbddefa3cc9a6.tar.bz2
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.
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r--Source/cmGeneratorTarget.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 110af43..096e2ea 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -84,6 +84,10 @@ public:
cmComputeLinkInformation* GetLinkInformation(
const std::string& config) const;
+ // Perform validation checks on memoized link structures.
+ // Call this after generation is complete.
+ void CheckLinkLibraries() const;
+
cmStateEnums::TargetType GetType() const;
const std::string& GetName() const;
std::string GetExportName() const;
@@ -973,6 +977,13 @@ private:
cmLinkImplementation const* GetLinkImplementation(const std::string& config,
bool secondPass) const;
+ enum class LinkItemRole
+ {
+ Implementation,
+ Interface,
+ };
+ bool VerifyLinkItemColons(LinkItemRole role, cmLinkItem const& item) const;
+
// Cache import information from properties for each configuration.
struct ImportInfo
{