Browse Source

Clear the link information in ClearLinkMaps.

The cache here needs to be cleared if GetLinkInformation is called
at configure-time, such as during an export().

The next commit does exactly that, and without this patch,
the LinkLanguage test would fail.
Stephen Kelly 12 years ago
parent
commit
bd82bb4787
1 changed files with 7 additions and 0 deletions
  1. 7 0
      Source/cmTarget.cxx

+ 7 - 0
Source/cmTarget.cxx

@@ -1520,6 +1520,13 @@ void cmTarget::ClearLinkMaps()
   this->Internal->LinkImplMap.clear();
   this->Internal->LinkInterfaceMap.clear();
   this->Internal->LinkClosureMap.clear();
+  for (cmTargetLinkInformationMap::const_iterator it
+      = this->LinkInformation.begin();
+      it != this->LinkInformation.end(); ++it)
+    {
+    delete it->second;
+    }
+  this->LinkInformation.clear();
 }
 
 //----------------------------------------------------------------------------