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

Method PrintHelpOneManual

Source/cmDocumentation.cxx:549–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549bool cmDocumentation::PrintHelpOneManual(std::ostream& os)
550{
551 std::string mname = this->CurrentArgument;
552 std::string::size_type mlen = mname.length();
553 if (mlen > 3 && mname[mlen - 3] == '(' && mname[mlen - 1] == ')') {
554 mname = cmStrCat(mname.substr(0, mlen - 3), '.', mname[mlen - 2]);
555 }
556 if (this->PrintFiles(os, cmStrCat("manual/", mname)) ||
557 this->PrintFiles(os, cmStrCat("manual/", mname, ".[0-9]"))) {
558 return true;
559 }
560 // Argument was not a manual. Complain.
561 os << "Argument \"" << this->CurrentArgument
562 << "\" to --help-manual is not an available manual. "
563 "Use --help-manual-list to see all available manuals.\n";
564 return false;
565}
566
567bool cmDocumentation::PrintHelpListManuals(std::ostream& os)
568{

Callers 1

PrintDocumentationMethod · 0.95

Calls 4

PrintFilesMethod · 0.95
lengthMethod · 0.80
cmStrCatFunction · 0.70
substrMethod · 0.45

Tested by

no test coverage detected