Factor old-style -D flags out from -I flag generation
Move the GetDefineFlags call from cmLocalGenerator::GetIncludeFlags to all call sites so that the method exclusively constructs a string of include search path flags.
This commit is contained in:
parent
d5d661d2b2
commit
d099546450
|
@ -575,6 +575,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname,
|
||||||
flags += this->Makefile->GetSafeDefinition(varString.c_str());
|
flags += this->Makefile->GetSafeDefinition(varString.c_str());
|
||||||
flags += " ";
|
flags += " ";
|
||||||
flags += this->GetIncludeFlags(lang);
|
flags += this->GetIncludeFlags(lang);
|
||||||
|
flags += this->Makefile->GetDefineFlags();
|
||||||
|
|
||||||
// Construct the command lines.
|
// Construct the command lines.
|
||||||
cmCustomCommandLines commandLines;
|
cmCustomCommandLines commandLines;
|
||||||
|
@ -1291,8 +1292,6 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
|
||||||
{
|
{
|
||||||
flags[flags.size()-1] = ' ';
|
flags[flags.size()-1] = ' ';
|
||||||
}
|
}
|
||||||
std::string defineFlags = this->Makefile->GetDefineFlags();
|
|
||||||
flags += defineFlags;
|
|
||||||
this->LanguageToIncludeFlags[lang] = flags;
|
this->LanguageToIncludeFlags[lang] = flags;
|
||||||
|
|
||||||
// Use this temorary variable for the return value to work-around a
|
// Use this temorary variable for the return value to work-around a
|
||||||
|
|
|
@ -312,6 +312,11 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags()
|
||||||
// Add include directory flags.
|
// Add include directory flags.
|
||||||
this->LocalGenerator->
|
this->LocalGenerator->
|
||||||
AppendFlags(flags, this->LocalGenerator->GetIncludeFlags(lang));
|
AppendFlags(flags, this->LocalGenerator->GetIncludeFlags(lang));
|
||||||
|
|
||||||
|
// Append old-style preprocessor definition flags.
|
||||||
|
this->LocalGenerator->
|
||||||
|
AppendFlags(flags, this->Makefile->GetDefineFlags());
|
||||||
|
|
||||||
// Add include directory flags.
|
// Add include directory flags.
|
||||||
this->LocalGenerator->
|
this->LocalGenerator->
|
||||||
AppendFlags(flags,this->GetFrameworkFlags().c_str());
|
AppendFlags(flags,this->GetFrameworkFlags().c_str());
|
||||||
|
|
Loading…
Reference in New Issue