summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-08-02 13:07:21 (GMT)
committerBrad King <brad.king@kitware.com>2001-08-02 13:07:21 (GMT)
commit9e5c769c29ea7d97e0b29e9c6cfe905859bc358f (patch)
treee39184bf010cbc767800059cee16cf37581e3117
parent8a03ccda075da86e9dcfc3ad5286aa0793d87619 (diff)
downloadCMake-9e5c769c29ea7d97e0b29e9c6cfe905859bc358f.zip
CMake-9e5c769c29ea7d97e0b29e9c6cfe905859bc358f.tar.gz
CMake-9e5c769c29ea7d97e0b29e9c6cfe905859bc358f.tar.bz2
BUG: We don't want to output -I/usr/include in the INCLUDE_FLAGS variable. This causes problems with finding system headers in the wrong places for certain standard library implementations.
-rw-r--r--Source/cmUnixMakefileGenerator.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index 24f4036..2e32959 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -659,7 +659,13 @@ void cmUnixMakefileGenerator::OutputMakeFlags(std::ostream& fout)
for(i = includes.begin(); i != includes.end(); ++i)
{
std::string include = *i;
- fout << "-I" << cmSystemTools::EscapeSpaces(i->c_str()).c_str() << " ";
+ // Don't output a -I for the standard include path "/usr/include".
+ // This can cause problems with certain standard library
+ // implementations because the wrong headers may be found first.
+ if(include != "/usr/include")
+ {
+ fout << "-I" << cmSystemTools::EscapeSpaces(i->c_str()).c_str() << " ";
+ }
}
fout << m_Makefile->GetDefineFlags();
fout << "\n\n";