|
|
@@ -1096,7 +1096,8 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
|
|
|
}
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
-void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs)
|
|
|
+void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
|
|
|
+ bool filter_system_dirs)
|
|
|
{
|
|
|
// Need to decide whether to automatically include the source and
|
|
|
// binary directories at the beginning of the include path.
|
|
|
@@ -1170,18 +1171,21 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // Do not explicitly add the standard include path "/usr/include".
|
|
|
- // This can cause problems with certain standard library
|
|
|
- // implementations because the wrong headers may be found first.
|
|
|
- emitted.insert("/usr/include");
|
|
|
- if(const char* implicitIncludes = this->Makefile->GetDefinition
|
|
|
- ("CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES"))
|
|
|
+ if(filter_system_dirs)
|
|
|
{
|
|
|
- std::vector<std::string> implicitIncludeVec;
|
|
|
- cmSystemTools::ExpandListArgument(implicitIncludes, implicitIncludeVec);
|
|
|
- for(unsigned int k = 0; k < implicitIncludeVec.size(); ++k)
|
|
|
+ // Do not explicitly add the standard include path "/usr/include".
|
|
|
+ // This can cause problems with certain standard library
|
|
|
+ // implementations because the wrong headers may be found first.
|
|
|
+ emitted.insert("/usr/include");
|
|
|
+ if(const char* implicitIncludes = this->Makefile->GetDefinition
|
|
|
+ ("CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES"))
|
|
|
{
|
|
|
- emitted.insert(implicitIncludeVec[k]);
|
|
|
+ std::vector<std::string> implicitIncludeVec;
|
|
|
+ cmSystemTools::ExpandListArgument(implicitIncludes, implicitIncludeVec);
|
|
|
+ for(unsigned int k = 0; k < implicitIncludeVec.size(); ++k)
|
|
|
+ {
|
|
|
+ emitted.insert(implicitIncludeVec[k]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|