| 508 | } |
| 509 | |
| 510 | void cmDocumentation::PrintNames(std::ostream& os, std::string const& pattern) |
| 511 | { |
| 512 | std::vector<std::string> files; |
| 513 | this->GlobHelp(files, pattern); |
| 514 | std::vector<std::string> names; |
| 515 | for (std::string const& f : files) { |
| 516 | std::string line; |
| 517 | cmsys::ifstream fin(f.c_str()); |
| 518 | while (fin && cmSystemTools::GetLineFromStream(fin, line)) { |
| 519 | if (!line.empty() && (cmsysString_isalnum(line[0]) || line[0] == '<')) { |
| 520 | names.push_back(line); |
| 521 | break; |
| 522 | } |
| 523 | } |
| 524 | } |
| 525 | std::sort(names.begin(), names.end()); |
| 526 | for (std::string const& n : names) { |
| 527 | os << n << '\n'; |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | bool cmDocumentation::PrintFiles(std::ostream& os, std::string const& pattern) |
| 532 | { |
no test coverage detected