summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 0a2e7b5..6433681 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -328,6 +328,18 @@ bool cmGlobalGenerator::CheckTargetsForMissingSources() const
return failed;
}
+void cmGlobalGenerator::CheckTargetLinkLibraries() const
+{
+ for (const auto& generator : this->LocalGenerators) {
+ for (const auto& gt : generator->GetGeneratorTargets()) {
+ gt->CheckLinkLibraries();
+ }
+ for (const auto& gt : generator->GetOwnedImportedGeneratorTargets()) {
+ gt->CheckLinkLibraries();
+ }
+ }
+}
+
bool cmGlobalGenerator::CheckTargetsForType() const
{
if (!this->GetLanguageEnabled("Swift")) {
@@ -1606,6 +1618,9 @@ void cmGlobalGenerator::Generate()
this->ExtraGenerator->Generate();
}
+ // Perform validation checks on memoized link structures.
+ this->CheckTargetLinkLibraries();
+
if (!this->CMP0042WarnTargets.empty()) {
std::ostringstream w;
w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0042) << "\n";