summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-05-08 19:49:26 (GMT)
committerBrad King <brad.king@kitware.com>2024-05-21 13:22:51 (GMT)
commite64d09a72957434187887fec8cbd89be042f173b (patch)
tree88418cde093653a95f0147038f443e6ea2e9b4c0 /Source/cmGeneratorTarget.cxx
parenta11cbcc2689ae9fd19908e046a28f6fdd6fb3c15 (diff)
downloadCMake-e64d09a72957434187887fec8cbd89be042f173b.zip
CMake-e64d09a72957434187887fec8cbd89be042f173b.tar.gz
CMake-e64d09a72957434187887fec8cbd89be042f173b.tar.bz2
cmGeneratorTarget: Add GetLinkImplementationClosure mode for linking
Previously this method always returned the closure for compile-only usage requirements. Add an option to get the closure for linking, which pierces `$<LINK_ONLY>`.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index ce53316..daeac57 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -511,6 +511,8 @@ void cmGeneratorTarget::ClearSourcesCache()
this->SourcesAreContextDependent = Tribool::Indeterminate;
this->Objects.clear();
this->VisitedConfigsForObjects.clear();
+ this->LinkImplClosureForLinkMap.clear();
+ this->LinkImplClosureForUsageMap.clear();
this->LinkImplMap.clear();
this->LinkImplUsageRequirementsOnlyMap.clear();
this->IncludeDirectoriesCache.clear();
@@ -1186,7 +1188,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(
}
std::vector<cmGeneratorTarget const*> const& deps =
- this->GetLinkImplementationClosure(config);
+ this->GetLinkImplementationClosure(config, UseTo::Compile);
for (cmGeneratorTarget const* dep : deps) {
handleSystemIncludesDep(this->LocalGenerator, dep, config, this,
&dagChecker, result, excludeImported, language);