diff options
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 8 |
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"; |