ENH: fix for bug -gdwarf getting removed

This commit is contained in:
Bill Hoffman 2006-10-12 10:57:36 -04:00
parent b20fd1af11
commit 107e01c8dc
1 changed files with 4 additions and 0 deletions

View File

@ -866,6 +866,10 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag,
std::string::size_type pos = flags.find(flag); std::string::size_type pos = flags.find(flag);
if(pos != flags.npos) if(pos != flags.npos)
{ {
if(flags[pos + strlen(flag)] != ' ')
{
return flags;
}
retFlag = flag; retFlag = flag;
// remove the flag // remove the flag
flags[pos]=' '; flags[pos]=' ';