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/cmLocalGenerator.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/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 27b1b1b..4f5af0a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -556,7 +556,7 @@ void cmLocalGenerator::GenerateTargetManifest() void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, const char* lang, cmSourceFile& source, - cmTarget& ) + cmTarget& target) { std::string objectDir = cmSystemTools::GetFilenamePath(std::string(ofname)); objectDir = this->Convert(objectDir.c_str(),START_OUTPUT,SHELL); @@ -576,7 +576,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, flags += " "; { std::vector<std::string> includes; - this->GetIncludeDirectories(includes, lang); + this->GetIncludeDirectories(includes, &target, lang); flags += this->GetIncludeFlags(includes, lang); } flags += this->Makefile->GetDefineFlags(); @@ -1313,6 +1313,7 @@ std::string cmLocalGenerator::GetIncludeFlags( //---------------------------------------------------------------------------- void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs, + cmTarget* target, const char* lang) { // Need to decide whether to automatically include the source and @@ -1398,9 +1399,12 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs, } } - // Get the project-specified include directories. - const std::vector<std::string>& includes = - this->Makefile->GetIncludeDirectories(); + // Get the target-specific include directories. + std::vector<std::string> includes; + if(target) + { + includes = target->GetIncludeDirectories(); + } // Support putting all the in-project include directories first if // it is requested by the project. |