diff options
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b2788ae..70e5760 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1186,6 +1186,23 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang) { return this->LanguageToIncludeFlags[lang].c_str(); } + + // Load implicit include directories for this language. + std::set<cmStdString> impDirs; + 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) + { + impDirs.insert(*i); + } + } + cmOStringStream includeFlags; std::vector<std::string> includes; this->GetIncludeDirectories(includes); @@ -1233,6 +1250,11 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang) #endif for(i = includes.begin(); i != includes.end(); ++i) { + // Skip implicit include directories. + if(impDirs.find(*i) != impDirs.end()) + { + continue; + } #ifdef __APPLE__ if(cmSystemTools::IsPathToFramework(i->c_str())) { |