diff options
author | Brad King <brad.king@kitware.com> | 2014-04-24 19:05:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-25 12:41:31 (GMT) |
commit | 478356e6d9755e5c09c2c5eff8375241cc0f2ea5 (patch) | |
tree | fb1b64f9608f24299afb68d590f31c8824b52d95 /Source | |
parent | 20b46a09e38be7521a903e1846716ce9a2ed2df6 (diff) | |
download | CMake-478356e6d9755e5c09c2c5eff8375241cc0f2ea5.zip CMake-478356e6d9755e5c09c2c5eff8375241cc0f2ea5.tar.gz CMake-478356e6d9755e5c09c2c5eff8375241cc0f2ea5.tar.bz2 |
Restore --help-full option to output all help manuals
This option was removed during conversion to the reStructuredText
documentation. Restore it. Process documentation starting at
Help/index.rst so that all manuals are included in the output.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmDocumentation.cxx | 14 | ||||
-rw-r--r-- | Source/cmDocumentation.h | 1 | ||||
-rw-r--r-- | Source/cmDocumentationFormatter.h | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 9c27fc1..5be4d5c 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -30,6 +30,8 @@ static const char *cmDocumentationStandardOptions[][2] = "Print usage information and exit."}, {"--version,-version,/V [<f>]", "Print version number and exit."}, + {"--help-full [<f>]", + "Print all help manuals and exit."}, {"--help-manual <man> [<f>]", "Print one help manual and exit."}, {"--help-manual-list [<f>]", @@ -112,6 +114,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os) { case cmDocumentation::Usage: return this->PrintDocumentationUsage(os); + case cmDocumentation::Full: + return this->PrintHelpFull(os); case cmDocumentation::OneManual: return this->PrintHelpOneManual(os); case cmDocumentation::OneCommand: @@ -364,9 +368,9 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv, } else if(strcmp(argv[i], "--help-full") == 0) { + help.HelpType = cmDocumentation::Full; GET_OPT_ARGUMENT(help.Filename); - cmSystemTools::Message("Warning: --help-full no longer supported"); - return true; + this->WarnFormFromFilename(help, result); } else if(strcmp(argv[i], "--help-html") == 0) { @@ -678,6 +682,12 @@ bool cmDocumentation::PrintFiles(std::ostream& os, } //---------------------------------------------------------------------------- +bool cmDocumentation::PrintHelpFull(std::ostream& os) +{ + return this->PrintFiles(os, "index"); +} + +//---------------------------------------------------------------------------- bool cmDocumentation::PrintHelpOneManual(std::ostream& os) { std::string mname = this->CurrentArgument; diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index d5a7dd5..cc16eb7 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -102,6 +102,7 @@ private: bool PrintFiles(std::ostream& os, std::string const& pattern); bool PrintVersion(std::ostream& os); + bool PrintHelpFull(std::ostream& os); bool PrintHelpOneManual(std::ostream& os); bool PrintHelpOneCommand(std::ostream& os); bool PrintHelpOneModule(std::ostream& os); diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index 118f03d..61766b9 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -26,7 +26,7 @@ public: /** Types of help provided. */ enum Type { - None, Version, Usage, ListManuals, + None, Version, Usage, Full, ListManuals, ListCommands, ListModules, ListProperties, ListVariables, ListPolicies, OneManual, OneCommand, OneModule, OneProperty, OneVariable, OnePolicy, OldCustomModules |