diff options
author | Stephen Kelly <steveire@gmail.com> | 2011-11-05 15:17:49 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2012-02-22 11:31:50 (GMT) |
commit | 9106b564ae5bf0bf1c1ff4a3fca484bcfd40e183 (patch) | |
tree | 26d6a7889a9fcafa83a4d7f8f8d48d37db0bee68 /Source/cmMakeDepend.cxx | |
parent | 840509babb2d1c8fc5167c4580fef58546c06700 (diff) | |
download | CMake-9106b564ae5bf0bf1c1ff4a3fca484bcfd40e183.zip CMake-9106b564ae5bf0bf1c1ff4a3fca484bcfd40e183.tar.gz CMake-9106b564ae5bf0bf1c1ff4a3fca484bcfd40e183.tar.bz2 |
Extract and use the INCLUDE_DIRECTORIES target properties.
Eliminate callers of cmMakefile::GetIncludeDirectories.
All callers of GetIncludeDirectories should go through the local generator
object.
Only the local generator calls cmTarget::GetIncludeDirectories directly.
Diffstat (limited to 'Source/cmMakeDepend.cxx')
-rw-r--r-- | Source/cmMakeDepend.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/cmMakeDepend.cxx b/Source/cmMakeDepend.cxx index 0b4eea5..03fe33d 100644 --- a/Source/cmMakeDepend.cxx +++ b/Source/cmMakeDepend.cxx @@ -54,16 +54,20 @@ void cmMakeDepend::SetMakefile(cmMakefile* makefile) this->Makefile->IncludeFileRegularExpression.c_str()); this->ComplainFileRegularExpression.compile( this->Makefile->ComplainFileRegularExpression.c_str()); - - // Now extract any include paths from the makefile flags - const std::vector<std::string>& includes = - this->Makefile->GetIncludeDirectories(); - for(std::vector<std::string>::const_iterator j = includes.begin(); - j != includes.end(); ++j) + + // Now extract any include paths from the targets + cmTargets & targets = this->Makefile->GetTargets(); + for (cmTargets::iterator l = targets.begin(); l != targets.end(); ++l) { - std::string path = *j; - this->Makefile->ExpandVariablesInString(path); - this->AddSearchPath(path.c_str()); + const std::vector<std::string>& includes = + l->second.GetIncludeDirectories(); + for(std::vector<std::string>::const_iterator j = includes.begin(); + j != includes.end(); ++j) + { + std::string path = *j; + this->Makefile->ExpandVariablesInString(path); + this->AddSearchPath(path.c_str()); + } } } |