From bd82bb4787410a0bdd6120b8c449f5d31ecc4c28 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 20 Jan 2013 17:18:23 +0100 Subject: 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. --- Source/cmTarget.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c1c484b..2600db5 100644 --- a/Source/cmTarget.cxx +++ b/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(); } //---------------------------------------------------------------------------- -- cgit v0.12