summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-15 15:39:36 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-16 17:31:29 (GMT)
commitfb3518dc81ac1b776503d4369c6d375a706485d1 (patch)
tree60c47100cb3a78b57569a3ca59aa8bbfc4d558fb /Source/cmGeneratorTarget.cxx
parent535fd6ce6d514deebc8c95424df83f73989f55a5 (diff)
downloadCMake-fb3518dc81ac1b776503d4369c6d375a706485d1.zip
CMake-fb3518dc81ac1b776503d4369c6d375a706485d1.tar.gz
CMake-fb3518dc81ac1b776503d4369c6d375a706485d1.tar.bz2
Refactor system include annotation propagation
Since commit v3.0.0-rc1~174^2~1 (cmTarget: Fix system include annotation propagation, 2014-01-01) the cmGeneratorTarget::IsSystemIncludeDirectory method needs to collect all targets that might provide INTERFACE_(|SYSTEM)_INCLUDE_DIRECTORIES for the current target. We now have cmTarget::GetLinkImplementationClosure to provide this, so use it.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx41
1 files changed, 7 insertions, 34 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 64c5822..f9b68d4 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -445,13 +445,6 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
if (iter == this->SystemIncludesCache.end())
{
- cmTarget::LinkImplementation const* impl
- = this->Target->GetLinkImplementation(config);
- if(!impl)
- {
- return false;
- }
-
cmGeneratorExpressionDAGChecker dagChecker(
this->GetName(),
"SYSTEM_INCLUDE_DIRECTORIES", 0, 0);
@@ -471,35 +464,15 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
&dagChecker), result);
}
- std::set<cmTarget const*> uniqueDeps;
- for(std::vector<cmLinkImplItem>::const_iterator
- li = impl->Libraries.begin(); li != impl->Libraries.end(); ++li)
+ std::vector<cmTarget const*> const& deps =
+ this->Target->GetLinkImplementationClosure(config);
+ for(std::vector<cmTarget const*>::const_iterator
+ li = deps.begin(), le = deps.end(); li != le; ++li)
{
- cmTarget const* tgt = li->Target;
- if (!tgt)
- {
- continue;
- }
-
- if (uniqueDeps.insert(tgt).second)
- {
- handleSystemIncludesDep(this->Makefile, tgt, config, this->Target,
- &dagChecker, result, excludeImported);
-
- std::vector<cmTarget const*> deps;
- tgt->GetTransitivePropertyTargets(config, this->Target, deps);
-
- for(std::vector<cmTarget const*>::const_iterator di = deps.begin();
- di != deps.end(); ++di)
- {
- if (uniqueDeps.insert(*di).second)
- {
- handleSystemIncludesDep(this->Makefile, *di, config, this->Target,
- &dagChecker, result, excludeImported);
- }
- }
- }
+ handleSystemIncludesDep(this->Makefile, *li, config, this->Target,
+ &dagChecker, result, excludeImported);
}
+
std::set<std::string> unique;
for(std::vector<std::string>::iterator li = result.begin();
li != result.end(); ++li)