summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-02-24 20:37:09 (GMT)
committerBrad King <brad.king@kitware.com>2009-02-24 20:37:09 (GMT)
commit39f8b91125ee3cb426968f089049f393dee1f699 (patch)
tree01b7de7bf168040f33dfd6d492fe7ddeff2619eb /Source
parentff32962a682387ada24a7485a1bd21a3fc1b19d4 (diff)
downloadCMake-39f8b91125ee3cb426968f089049f393dee1f699.zip
CMake-39f8b91125ee3cb426968f089049f393dee1f699.tar.gz
CMake-39f8b91125ee3cb426968f089049f393dee1f699.tar.bz2
BUG: Remove implicit include dir suppression
We used to suppress generation of -I/usr/include (and on OSX also -I/usr/local/include). This behavior seems to cause more trouble than it's worth, so I'm removing it until someone encounters the original problem it fixed. See issue #8598.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx21
-rw-r--r--Source/cmLocalGenerator.h3
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx2
3 files changed, 3 insertions, 23 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 0f1c4ee..b2788ae 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1293,8 +1293,7 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
}
//----------------------------------------------------------------------------
-void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
- bool filter_system_dirs)
+void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs)
{
// Need to decide whether to automatically include the source and
// binary directories at the beginning of the include path.
@@ -1360,24 +1359,6 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
}
}
- if(filter_system_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"))
- {
- std::vector<std::string> implicitIncludeVec;
- cmSystemTools::ExpandListArgument(implicitIncludes, implicitIncludeVec);
- for(unsigned int k = 0; k < implicitIncludeVec.size(); ++k)
- {
- emitted.insert(implicitIncludeVec[k]);
- }
- }
- }
-
// Get the project-specified include directories.
std::vector<std::string>& includes =
this->Makefile->GetIncludeDirectories();
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 10ec3b8..75da316 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -189,8 +189,7 @@ public:
{ return true; }
/** Get the include flags for the current makefile and language. */
- void GetIncludeDirectories(std::vector<std::string>& dirs,
- bool filter_system_dirs = true);
+ void GetIncludeDirectories(std::vector<std::string>& dirs);
/** Compute the language used to compile the given source file. */
const char* GetSourceFileLanguage(const cmSourceFile& source);
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index a65d7c6..f92ff86 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -500,7 +500,7 @@ void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile()
infoFileStream
<< "SET(CMAKE_C_INCLUDE_PATH\n";
std::vector<std::string> includeDirs;
- this->GetIncludeDirectories(includeDirs, false);
+ this->GetIncludeDirectories(includeDirs);
for(std::vector<std::string>::iterator i = includeDirs.begin();
i != includeDirs.end(); ++i)
{