Commit 6e68bc22 authored by Brad King's avatar Brad King
Browse files

cmake: Add --help-policy-list option

All the other --help-<item> options have a corresponding option
--help-<item>-list.  Add one for --help-policy.
parent c9a5f34b
...@@ -371,6 +371,9 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os, ...@@ -371,6 +371,9 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os,
this->PrintDocumentationList(os,i->c_str()); this->PrintDocumentationList(os,i->c_str());
} }
return true; return true;
case cmDocumentation::PolicyList:
this->PrintDocumentationList(os,"Policies");
return true;
case cmDocumentation::Full: case cmDocumentation::Full:
return this->PrintDocumentationFull(os); return this->PrintDocumentationFull(os);
case cmDocumentation::Modules: case cmDocumentation::Modules:
...@@ -1256,6 +1259,12 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv, ...@@ -1256,6 +1259,12 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
GET_OPT_ARGUMENT(help.Filename); GET_OPT_ARGUMENT(help.Filename);
help.HelpForm = cmDocumentation::TextForm; help.HelpForm = cmDocumentation::TextForm;
} }
else if(strcmp(argv[i], "--help-policy-list") == 0)
{
help.HelpType = cmDocumentation::PolicyList;
GET_OPT_ARGUMENT(help.Filename);
help.HelpForm = cmDocumentation::TextForm;
}
else if(strcmp(argv[i], "--copyright") == 0) else if(strcmp(argv[i], "--copyright") == 0)
{ {
help.HelpType = cmDocumentation::Copyright; help.HelpType = cmDocumentation::Copyright;
......
...@@ -26,7 +26,7 @@ public: ...@@ -26,7 +26,7 @@ public:
/** Types of help provided. */ /** Types of help provided. */
enum Type enum Type
{ None, Usage, Single, SingleModule, SingleProperty, SingleVariable, { None, Usage, Single, SingleModule, SingleProperty, SingleVariable,
List, ModuleList, PropertyList, VariableList, List, ModuleList, PropertyList, VariableList, PolicyList,
Full, Properties, Variables, Modules, CustomModules, Commands, Full, Properties, Variables, Modules, CustomModules, Commands,
CompatCommands, Copyright, Version, Policies, SinglePolicy }; CompatCommands, Copyright, Version, Policies, SinglePolicy };
......
...@@ -195,6 +195,12 @@ static const char * cmDocumentationOptions[][3] = ...@@ -195,6 +195,12 @@ static const char * cmDocumentationOptions[][3] =
"If a file is specified, the documentation is written into and the output " "If a file is specified, the documentation is written into and the output "
"format is determined depending on the filename suffix. Supported are man " "format is determined depending on the filename suffix. Supported are man "
"page, HTML, DocBook and plain text."}, "page, HTML, DocBook and plain text."},
{"--help-policy-list [file]", "List available policies and exit.",
"The list contains all policies for which help may be obtained by using "
"the --help-policy argument followed by a policy name. "
"If a file is specified, the documentation is written into and the output "
"format is determined depending on the filename suffix. Supported are man "
"page, HTML, DocBook and plain text."},
{"--help-policies [file]", "Print help for all policies and exit.", {"--help-policies [file]", "Print help for all policies and exit.",
"Full documentation for all policies is displayed." "Full documentation for all policies is displayed."
"If a file is specified, the documentation is written into and the output " "If a file is specified, the documentation is written into and the output "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment