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,8 +659,14 @@ void cmUnixMakefileGenerator::OutputMakeFlags(std::ostream& fout)
|
|||
for(i = includes.begin(); i != includes.end(); ++i)
|
||||
{
|
||||
std::string include = *i;
|
||||
// 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";
|
||||
fout << "default_target: all\n\n";
|
||||
|
|
Loading…
Reference in New Issue