MCPcopy Create free account
hub / github.com/Kitware/CMake / DumpFileToXML

Method DumpFileToXML

Source/CTest/cmCTestLaunchReporter.cxx:267–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267void cmCTestLaunchReporter::DumpFileToXML(cmXMLElement& e3, char const* tag,
268 std::string const& fname)
269{
270 cmsys::ifstream fin(fname.c_str(), std::ios::in | std::ios::binary);
271
272 std::string line;
273 char const* sep = "";
274
275 cmXMLElement e4(e3, tag);
276 while (cmSystemTools::GetLineFromStream(fin, line)) {
277 if (this->MatchesFilterPrefix(line)) {
278 continue;
279 }
280 if (this->Match(line, this->RegexWarningSuppress)) {
281 line = cmStrCat("[CTest: warning suppressed] ", line);
282 } else if (this->Match(line, this->RegexWarning)) {
283 line = cmStrCat("[CTest: warning matched] ", line);
284 }
285 e4.Content(sep);
286 e4.Content(line);
287 sep = "\n";
288 }
289}
290
291bool cmCTestLaunchReporter::Match(
292 std::string const& line, std::vector<cmsys::RegularExpression>& regexps)

Callers 1

WriteXMLResultMethod · 0.95

Calls 5

MatchesFilterPrefixMethod · 0.95
MatchMethod · 0.95
c_strMethod · 0.80
cmStrCatFunction · 0.50
ContentMethod · 0.45

Tested by

no test coverage detected