瀏覽代碼

ENH: Add support for single '

Andy Cedilnik 20 年之前
父節點
當前提交
ad5115d00f
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. 16 0
      Source/cmSystemTools.cxx

+ 16 - 0
Source/cmSystemTools.cxx

@@ -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.