summaryrefslogtreecommitdiffstats
path: root/Source/cmConfigureGccXmlCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-08-29 21:11:03 (GMT)
committerBrad King <brad.king@kitware.com>2001-08-29 21:11:03 (GMT)
commit754e1cb9a5aadd27a21dda9bc410ee464e53afdc (patch)
tree4abacd5285f3dfd9e77d78b5c89cc246a59aa68c /Source/cmConfigureGccXmlCommand.cxx
parent2eefa2286aabfd0d156998af15390d7937376e16 (diff)
downloadCMake-754e1cb9a5aadd27a21dda9bc410ee464e53afdc.zip
CMake-754e1cb9a5aadd27a21dda9bc410ee464e53afdc.tar.gz
CMake-754e1cb9a5aadd27a21dda9bc410ee464e53afdc.tar.bz2
BUG: GCCXML_FLAGS found from find_gcc_options or find_mpro_options should have the trailing newline stripped from the string.
Diffstat (limited to 'Source/cmConfigureGccXmlCommand.cxx')
-rw-r--r--Source/cmConfigureGccXmlCommand.cxx26
1 files changed, 25 insertions, 1 deletions
diff --git a/Source/cmConfigureGccXmlCommand.cxx b/Source/cmConfigureGccXmlCommand.cxx
index 69e2dd5..b5864c7 100644
--- a/Source/cmConfigureGccXmlCommand.cxx
+++ b/Source/cmConfigureGccXmlCommand.cxx
@@ -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;
}
@@ -228,8 +240,20 @@ bool cmConfigureGccXmlCommand::FindMproIncludeFlags()
// Use the result of the command as the flags. Also prefix on the
// include path flag for the support directory.
- m_Flags = "-I"+supportDir+" "+flags;
+ 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;
}