summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx22
1 files changed, 18 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1ccfa47..d14bfca 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -142,7 +142,7 @@ public:
std::vector<IncludeDirectoriesEntry*> IncludeDirectoriesEntries;
std::vector<cmValueWithOrigin> LinkInterfaceIncludeDirectoriesEntries;
- std::vector<IncludeDirectoriesEntry*>
+ std::map<std::string, std::vector<IncludeDirectoriesEntry*> >
CachedLinkInterfaceIncludeDirectoriesEntries;
std::map<std::string, std::string> CachedLinkInterfaceCompileDefinitions;
@@ -165,6 +165,19 @@ void deleteAndClear(
}
//----------------------------------------------------------------------------
+void deleteAndClear(
+ std::map<std::string,
+ std::vector<cmTargetInternals::IncludeDirectoriesEntry*> > &entries)
+{
+ for (std::map<std::string,
+ std::vector<cmTargetInternals::IncludeDirectoriesEntry*> >::iterator
+ it = entries.begin(), end = entries.end(); it != end; ++it)
+ {
+ deleteAndClear(it->second);
+ }
+}
+
+//----------------------------------------------------------------------------
cmTargetInternals::~cmTargetInternals()
{
deleteAndClear(CachedLinkInterfaceIncludeDirectoriesEntries);
@@ -2976,14 +2989,15 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(
includeGenex);
- this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries.push_back(
+ this->Internal
+ ->CachedLinkInterfaceIncludeDirectoriesEntries[configString].push_back(
new cmTargetInternals::IncludeDirectoriesEntry(cge,
it->Value));
}
}
processIncludeDirectories(this,
- this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries,
+ this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries[configString],
includes,
uniqueIncludes,
&dagChecker,
@@ -2993,7 +3007,7 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
if (!this->Makefile->IsGeneratingBuildSystem())
{
deleteAndClear(
- this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries);
+ this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries);
}
else
{