summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraSublimeTextGenerator.cxx
diff options
context:
space:
mode:
authorBruno Pedrosa <brupelo@gmail.com>2016-10-20 00:35:58 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-24 18:02:52 (GMT)
commit9f1429e274df81344d260c8e42b3387a402940f1 (patch)
treeab0ce671218e4bdf12d1885d6e0f5b4681617aa1 /Source/cmExtraSublimeTextGenerator.cxx
parent0de6a404aafb497074980eba5144d243b6868d68 (diff)
downloadCMake-9f1429e274df81344d260c8e42b3387a402940f1.zip
CMake-9f1429e274df81344d260c8e42b3387a402940f1.tar.gz
CMake-9f1429e274df81344d260c8e42b3387a402940f1.tar.bz2
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
Diffstat (limited to 'Source/cmExtraSublimeTextGenerator.cxx')
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 41f82a2..b9e4246 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/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}";
}