Explorar o código

Sublime: Update generated diagnostic matching expression for MSVC

Update the generated `file_regex` to match MSVC-style messages in
addition to the GCC-style messages already matched.  Use non-capturing
sub-patterns to tolerate the differences in message formats while still
capturing the four pieces of information in proper group numbers (file
name, line number, column number, message).

Closes: #16375
Bruno Pedrosa %!s(int64=9) %!d(string=hai) anos
pai
achega
9f1429e274
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      Source/cmExtraSublimeTextGenerator.cxx

+ 3 - 1
Source/cmExtraSublimeTextGenerator.cxx

@@ -271,7 +271,9 @@ void cmExtraSublimeTextGenerator::AppendTarget(
        << this->BuildMakeCommand(make, makefileName.c_str(), targetName)
        << "],\n";
   fout << "\t\t\t\"working_dir\": \"${project_path}\",\n";
-  fout << "\t\t\t\"file_regex\": \"^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$\"\n";
+  fout << "\t\t\t\"file_regex\": \""
+          "^(..[^:]*)(?::|\\\\()([0-9]+)(?::|\\\\))(?:([0-9]+):)?\\\\s*(.*)"
+          "\"\n";
   fout << "\t\t}";
 }