diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index dc39fdc..ee5b9d8 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1407,20 +1407,22 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs, return; } - if (stripImplicitInclDirs) - { - // Load implicit include directories for this language. - std::string impDirVar = "CMAKE_"; - impDirVar += lang; - impDirVar += "_IMPLICIT_INCLUDE_DIRECTORIES"; - if(const char* value = this->Makefile->GetDefinition(impDirVar.c_str())) - { - std::vector<std::string> impDirVec; - cmSystemTools::ExpandListArgument(value, impDirVec); - for(std::vector<std::string>::const_iterator i = impDirVec.begin(); - i != impDirVec.end(); ++i) + std::vector<std::string> implicitDirs; + // Load implicit include directories for this language. + std::string impDirVar = "CMAKE_"; + impDirVar += lang; + impDirVar += "_IMPLICIT_INCLUDE_DIRECTORIES"; + if(const char* value = this->Makefile->GetDefinition(impDirVar.c_str())) + { + std::vector<std::string> impDirVec; + cmSystemTools::ExpandListArgument(value, impDirVec); + for(std::vector<std::string>::const_iterator i = impDirVec.begin(); + i != impDirVec.end(); ++i) + { + emitted.insert(*i); + if (!stripImplicitInclDirs) { - emitted.insert(*i); + implicitDirs.push_back(*i); } } } @@ -1463,6 +1465,15 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs, dirs.push_back(*i); } } + + for(std::vector<std::string>::const_iterator i = implicitDirs.begin(); + i != implicitDirs.end(); ++i) + { + if(std::find(includes.begin(), includes.end(), *i) != includes.end()) + { + dirs.push_back(*i); + } + } } void cmLocalGenerator::GetTargetFlags(std::string& linkLibs, |