ENH: fix for flags that have sub-string matches

This commit is contained in:
Bill Hoffman 2008-06-06 11:49:06 -04:00
parent fc8b27650c
commit 4bc39940c3
1 changed files with 1 additions and 1 deletions

View File

@ -997,7 +997,7 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag,
{ {
std::string retFlag; std::string retFlag;
std::string::size_type pos = flags.find(flag); std::string::size_type pos = flags.find(flag);
if(pos != flags.npos) if(pos != flags.npos && (pos ==0 || flags[pos]==' '))
{ {
while(pos < flags.size() && flags[pos] != ' ') while(pos < flags.size() && flags[pos] != ' ')
{ {