ENH: Add support for single '

This commit is contained in:
Andy Cedilnik 2005-02-17 10:51:18 -05:00
parent 0fd1c5d809
commit ad5115d00f
1 changed files with 16 additions and 0 deletions

View File

@ -359,6 +359,7 @@ std::vector<cmStdString> cmSystemTools::ParseArguments(const char* command)
if ( command[0] != '/' && command[1] == ':' && command[2] == '\\' ||
command[0] == '\"' && command[1] != '/' && command[2] == ':' && command[3] == '\\' ||
command[0] == '\'' && command[1] != '/' && command[2] == ':' && command[3] == '\\' ||
command[0] == '\\' && command[1] == '\\')
{
win_path = true;
@ -387,6 +388,21 @@ std::vector<cmStdString> cmSystemTools::ParseArguments(const char* command)
}
args.push_back(arg);
}
else if(*c == '\'')
{
// Parse a quoted argument.
++c;
while(*c && *c != '\'')
{
arg.append(1, *c);
++c;
}
if(*c)
{
++c;
}
args.push_back(arg);
}
else if(*c)
{
// Parse an unquoted argument.