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

Method PrintHelpOneArbitrary

Source/cmDocumentation.cxx:573–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573bool cmDocumentation::PrintHelpOneArbitrary(std::ostream& os)
574{
575 std::string word = cmSystemTools::HelpFileName(this->CurrentArgument);
576 std::string word_m = GeneralizeKeyword(word);
577
578 // Support legacy style uppercase commands, with LANG and CONFIG
579 // substitutions
580 bool found = this->PrintFiles(os, cmStrCat("*/", word));
581 if (found) {
582 os << "\n";
583 }
584 found = this->PrintFiles(
585 os, cmStrCat("command/", cmSystemTools::LowerCase(word))) ||
586 found;
587 if (found) {
588 return true;
589 }
590 found = this->PrintFiles(os, cmStrCat("*/", word_m));
591 if (found) {
592 os << "\n";
593 }
594 found = this->PrintFiles(
595 os, cmStrCat("command/", cmSystemTools::LowerCase(word_m))) ||
596 found;
597 if (found) {
598 return true;
599 }
600 os << "Argument \"" << this->CurrentArgument
601 << "\" to --help did not match any keywords. "
602 "Use --help without any arguments to print CMake help information.\n";
603 return false;
604}
605
606bool cmDocumentation::PrintHelpOneCommand(std::ostream& os)
607{

Callers 1

PrintDocumentationMethod · 0.95

Calls 2

PrintFilesMethod · 0.95
cmStrCatFunction · 0.70

Tested by

no test coverage detected