BUG: GCCXML_FLAGS found from find_gcc_options or find_mpro_options should have the trailing newline stripped from the string.
This commit is contained in:
parent
2eefa2286a
commit
754e1cb9a5
|
@ -200,6 +200,18 @@ bool cmConfigureGccXmlCommand::FindGccIncludeFlags()
|
|||
// Use the result of the command as the flags.
|
||||
m_Flags = flags;
|
||||
|
||||
// Strip newline from end of flags.
|
||||
if((m_Flags.length() > 0)
|
||||
&& (m_Flags[m_Flags.length()-1] == '\n'))
|
||||
{
|
||||
m_Flags = m_Flags.substr(0, m_Flags.length()-1);
|
||||
if((m_Flags.length() > 0)
|
||||
&& (m_Flags[m_Flags.length()-1] == '\r'))
|
||||
{
|
||||
m_Flags = m_Flags.substr(0, m_Flags.length()-1);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -230,6 +242,18 @@ bool cmConfigureGccXmlCommand::FindMproIncludeFlags()
|
|||
// include path flag for the support directory.
|
||||
m_Flags = "-I"+supportDir+" "+flags;
|
||||
|
||||
// Strip newline from end of flags.
|
||||
if((m_Flags.length() > 0)
|
||||
&& (m_Flags[m_Flags.length()-1] == '\n'))
|
||||
{
|
||||
m_Flags = m_Flags.substr(0, m_Flags.length()-1);
|
||||
if((m_Flags.length() > 0)
|
||||
&& (m_Flags[m_Flags.length()-1] == '\r'))
|
||||
{
|
||||
m_Flags = m_Flags.substr(0, m_Flags.length()-1);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue