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/cmDepends.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/cmDepends.cxx')
-rw-r--r-- | Source/cmDepends.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index 19558fa..94ff471 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -260,12 +260,24 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends, //---------------------------------------------------------------------------- void cmDepends::SetIncludePathFromLanguage(const char* lang) { + // Look for the new per "TARGET_" variant first: std::string includePathVar = "CMAKE_"; includePathVar += lang; - includePathVar += "_INCLUDE_PATH"; + includePathVar += "_TARGET_INCLUDE_PATH"; cmMakefile* mf = this->LocalGenerator->GetMakefile(); if(const char* includePath = mf->GetDefinition(includePathVar.c_str())) { cmSystemTools::ExpandListArgument(includePath, this->IncludePath); } + else + { + // Fallback to the old directory level variable if no per-target var: + includePathVar = "CMAKE_"; + includePathVar += lang; + includePathVar += "_INCLUDE_PATH"; + if(const char* includePath = mf->GetDefinition(includePathVar.c_str())) + { + cmSystemTools::ExpandListArgument(includePath, this->IncludePath); + } + } } |