summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d095879..a4f3f2f 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1030,11 +1030,25 @@ void cmTarget::SetMakefile(cmMakefile* mf)
//----------------------------------------------------------------------------
void cmTarget::FinishConfigure()
{
+ // Erase any cached link information that might have been comptued
+ // on-demand during the configuration. This ensures that build
+ // system generation uses up-to-date information even if other cache
+ // invalidation code in this source file is buggy.
+ this->ClearLinkMaps();
+
// Do old-style link dependency analysis.
this->AnalyzeLibDependencies(*this->Makefile);
}
//----------------------------------------------------------------------------
+void cmTarget::ClearLinkMaps()
+{
+ this->Internal->LinkImplMap.clear();
+ this->Internal->LinkInterfaceMap.clear();
+ this->Internal->LinkClosureMap.clear();
+}
+
+//----------------------------------------------------------------------------
cmListFileBacktrace const& cmTarget::GetBacktrace() const
{
return this->Internal->Backtrace;
@@ -1656,6 +1670,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
tmp.second = llt;
this->LinkLibraries.push_back( tmp );
this->OriginalLinkLibraries.push_back(tmp);
+ this->ClearLinkMaps();
// Add the explicit dependency information for this target. This is
// simply a set of libraries separated by ";". There should always
@@ -2023,6 +2038,10 @@ void cmTarget::MaybeInvalidatePropertyCache(const char* prop)
{
this->Internal->ImportInfoMap.clear();
}
+ if(!this->IsImported() && strncmp(prop, "LINK_INTERFACE_", 15) == 0)
+ {
+ this->ClearLinkMaps();
+ }
}
//----------------------------------------------------------------------------