summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-09-16 15:29:06 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-16 13:22:35 (GMT)
commitec6df3675e78d370dbb924bbddf21d01f3ecb071 (patch)
tree6478d717ac8cbb6c39b1d681e78a9dc4710860a8 /Source/cmDocumentation.h
parent25f2877eef3b876922c0e40053205026c8c00e7d (diff)
downloadCMake-ec6df3675e78d370dbb924bbddf21d01f3ecb071.zip
CMake-ec6df3675e78d370dbb924bbddf21d01f3ecb071.tar.gz
CMake-ec6df3675e78d370dbb924bbddf21d01f3ecb071.tar.bz2
Teach --help-* options to load documentation from .rst files
Install the Help directory next to Modules to make it available in CMake distributions. Use cmRST to read Help .rst documents and print them as help output. Add options --help-manual-list --help-manual to list available manuals or print one of them. Implement the options --help-commands --help-modules --help-policies --help-properties --help-variables by mapping to the corresponding manual page. Implement the options --help-command-list --help-module-list --help-policy-list --help-property-list --help-variable-list by globbing the available Help .rst documents of the corresponding type and reading their titles. Implement the options --help-command --help-module --help-policy --help-property --help-variable by globbing the matching Help .rst document(s) and printing them.
Diffstat (limited to 'Source/cmDocumentation.h')
-rw-r--r--Source/cmDocumentation.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index fac3748..31c7602 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -131,7 +131,23 @@ public:
private:
void SetForm(Form f, int manSection);
+ void GlobHelp(std::vector<std::string>& files, std::string const& pattern);
+ void PrintNames(std::ostream& os, std::string const& pattern);
+ bool PrintFiles(std::ostream& os, std::string const& pattern);
+
bool PrintVersion(std::ostream& os);
+ bool PrintHelpOneManual(std::ostream& os);
+ bool PrintHelpOneCommand(std::ostream& os);
+ bool PrintHelpOneModule(std::ostream& os);
+ bool PrintHelpOnePolicy(std::ostream& os);
+ bool PrintHelpOneProperty(std::ostream& os);
+ bool PrintHelpOneVariable(std::ostream& os);
+ bool PrintHelpListManuals(std::ostream& os);
+ bool PrintHelpListCommands(std::ostream& os);
+ bool PrintHelpListModules(std::ostream& os);
+ bool PrintHelpListProperties(std::ostream& os);
+ bool PrintHelpListVariables(std::ostream& os);
+ bool PrintHelpListPolicies(std::ostream& os);
bool PrintDocumentationUsage(std::ostream& os);
const char* GetNameString() const;