فهرست منبع

BUG: Cannot add extra escapes for backslashes because it makes the behavior inconsistent with previous versions of cmake.

Brad King 22 سال پیش
والد
کامیت
0169ccf157
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      Source/cmAddTestCommand.cxx

+ 4 - 2
Source/cmAddTestCommand.cxx

@@ -72,8 +72,10 @@ void cmAddTestCommand::FinalPass()
       fout << " \"";
       for(std::string::iterator c = it->begin(); c != it->end(); ++c)
         {
-        // Escape quotes and backslashes within arguments.
-        if((*c == '"') || (*c == '\\'))
+        // Escape quotes within arguments.  We should escape
+        // backslashes too but we cannot because it makes the result
+        // inconsistent with previous behavior of this command.
+        if((*c == '"'))
           {
           fout << '\\';
           }