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.
This commit is contained in:
parent
8a03ccda07
commit
9e5c769c29
|
@ -659,7 +659,13 @@ void cmUnixMakefileGenerator::OutputMakeFlags(std::ostream& fout)
|
||||||
for(i = includes.begin(); i != includes.end(); ++i)
|
for(i = includes.begin(); i != includes.end(); ++i)
|
||||||
{
|
{
|
||||||
std::string include = *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 << m_Makefile->GetDefineFlags();
|
||||||
fout << "\n\n";
|
fout << "\n\n";
|
||||||
|
|
Loading…
Reference in New Issue