From ad5115d00f4753970187739c20360d922b36e7b1 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 17 Feb 2005 10:51:18 -0500 Subject: [PATCH] ENH: Add support for single ' --- Source/cmSystemTools.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 07d46ef24..556dcafd4 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -359,6 +359,7 @@ std::vector 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 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.