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

Method LoadCoverageData

Source/CTest/cmParseCacheCoverage.cxx:23–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23bool cmParseCacheCoverage::LoadCoverageData(std::string const& d)
24{
25 // load all the .mcov files in the specified directory
26 cmsys::Directory dir;
27 if (!dir.Load(d)) {
28 return false;
29 }
30 size_t numf;
31 unsigned int i;
32 numf = dir.GetNumberOfFiles();
33 for (i = 0; i < numf; i++) {
34 std::string file = dir.GetFile(i);
35 if (file != "." && file != ".." && !cmSystemTools::FileIsDirectory(file)) {
36 std::string path = cmStrCat(d, '/', file);
37 if (cmSystemTools::GetFilenameLastExtension(path) == ".cmcov") {
38 if (!this->ReadCMCovFile(path.c_str())) {
39 return false;
40 }
41 }
42 }
43 }
44 return true;
45}
46
47// not currently used, but leave it in case we want it in the future
48void cmParseCacheCoverage::RemoveUnCoveredFiles()

Callers

nothing calls this directly

Calls 4

ReadCMCovFileMethod · 0.95
c_strMethod · 0.80
cmStrCatFunction · 0.50
LoadMethod · 0.45

Tested by

no test coverage detected