summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-09-28 13:49:40 (GMT)
committerBrad King <brad.king@kitware.com>2006-09-28 13:49:40 (GMT)
commit0b135767d6670c9b9fc51d50f7e222394383a374 (patch)
treebc723a2265803fc9a05f2dffc4d45fba905b8d8b /Source/cmLocalGenerator.cxx
parentc717db3b88350c4795ceaed5c049cbb2b65bc4ce (diff)
downloadCMake-0b135767d6670c9b9fc51d50f7e222394383a374.zip
CMake-0b135767d6670c9b9fc51d50f7e222394383a374.tar.gz
CMake-0b135767d6670c9b9fc51d50f7e222394383a374.tar.bz2
BUG: Do not filter system directories for include file dependencies.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx26
1 files changed, 15 insertions, 11 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index a3b48b3..95eb666 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -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]);
+ }
}
}