| 19 | } |
| 20 | |
| 21 | bool cmParseGTMCoverage::LoadCoverageData(std::string const& d) |
| 22 | { |
| 23 | // load all the .mcov files in the specified directory |
| 24 | cmsys::Directory dir; |
| 25 | if (!dir.Load(d)) { |
| 26 | return false; |
| 27 | } |
| 28 | size_t numf; |
| 29 | unsigned int i; |
| 30 | numf = dir.GetNumberOfFiles(); |
| 31 | for (i = 0; i < numf; i++) { |
| 32 | std::string file = dir.GetFile(i); |
| 33 | if (file != "." && file != ".." && !cmSystemTools::FileIsDirectory(file)) { |
| 34 | std::string path = cmStrCat(d, '/', file); |
| 35 | if (cmSystemTools::GetFilenameLastExtension(path) == ".mcov") { |
| 36 | if (!this->ReadMCovFile(path.c_str())) { |
| 37 | return false; |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | return true; |
| 43 | } |
| 44 | |
| 45 | bool cmParseGTMCoverage::ReadMCovFile(char const* file) |
| 46 | { |