|
|
@@ -338,6 +338,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os)
|
|
|
return this->PrintDocumentationSingle(os);
|
|
|
case cmDocumentation::SingleModule:
|
|
|
return this->PrintDocumentationSingleModule(os);
|
|
|
+ case cmDocumentation::SinglePolicy:
|
|
|
+ return this->PrintDocumentationSinglePolicy(os);
|
|
|
case cmDocumentation::SingleProperty:
|
|
|
return this->PrintDocumentationSingleProperty(os);
|
|
|
case cmDocumentation::SingleVariable:
|
|
|
@@ -381,6 +383,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os)
|
|
|
return this->PrintDocumentationModules(os);
|
|
|
case cmDocumentation::CustomModules:
|
|
|
return this->PrintDocumentationCustomModules(os);
|
|
|
+ case cmDocumentation::Policies:
|
|
|
+ return this->PrintDocumentationPolicies(os);
|
|
|
case cmDocumentation::Properties:
|
|
|
return this->PrintDocumentationProperties(os);
|
|
|
case cmDocumentation::Variables:
|
|
|
@@ -694,6 +698,12 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv)
|
|
|
GET_OPT_ARGUMENT(help.Filename);
|
|
|
help.HelpForm = this->GetFormFromFilename(help.Filename);
|
|
|
}
|
|
|
+ else if(strcmp(argv[i], "--help-policies") == 0)
|
|
|
+ {
|
|
|
+ help.HelpType = cmDocumentation::Policies;
|
|
|
+ GET_OPT_ARGUMENT(help.Filename);
|
|
|
+ help.HelpForm = this->GetFormFromFilename(help.Filename);
|
|
|
+ }
|
|
|
else if(strcmp(argv[i], "--help-variables") == 0)
|
|
|
{
|
|
|
help.HelpType = cmDocumentation::Variables;
|
|
|
@@ -764,6 +774,13 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv)
|
|
|
GET_OPT_ARGUMENT(help.Filename);
|
|
|
help.HelpForm = this->GetFormFromFilename(help.Filename);
|
|
|
}
|
|
|
+ else if(strcmp(argv[i], "--help-policy") == 0)
|
|
|
+ {
|
|
|
+ help.HelpType = cmDocumentation::SinglePolicy;
|
|
|
+ GET_OPT_ARGUMENT(help.Argument);
|
|
|
+ GET_OPT_ARGUMENT(help.Filename);
|
|
|
+ help.HelpForm = this->GetFormFromFilename(help.Filename);
|
|
|
+ }
|
|
|
else if(strcmp(argv[i], "--help-variable") == 0)
|
|
|
{
|
|
|
help.HelpType = cmDocumentation::SingleVariable;
|
|
|
@@ -1132,6 +1149,20 @@ bool cmDocumentation::PrintDocumentationSingleProperty(std::ostream& os)
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
+bool cmDocumentation::PrintDocumentationSinglePolicy(std::ostream& os)
|
|
|
+{
|
|
|
+ if (this->PrintDocumentationGeneric(os,"Policies"))
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Argument was not a command. Complain.
|
|
|
+ os << "Argument \"" << this->CurrentArgument.c_str()
|
|
|
+ << "\" to --help-policy is not a CMake policy.\n";
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
//----------------------------------------------------------------------------
|
|
|
bool cmDocumentation::PrintDocumentationSingleVariable(std::ostream& os)
|
|
|
{
|
|
|
@@ -1232,6 +1263,21 @@ bool cmDocumentation::PrintDocumentationCustomModules(std::ostream& os)
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
+bool cmDocumentation::PrintDocumentationPolicies(std::ostream& os)
|
|
|
+{
|
|
|
+ this->ClearSections();
|
|
|
+ this->AddSectionToPrint("Description");
|
|
|
+ this->AddSectionToPrint("Policies");
|
|
|
+ this->AddSectionToPrint("Copyright");
|
|
|
+ this->AddSectionToPrint("See Also");
|
|
|
+
|
|
|
+ this->CurrentFormatter->PrintHeader(this->GetNameString(), os);
|
|
|
+ this->Print(os);
|
|
|
+ this->CurrentFormatter->PrintFooter(os);
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
//----------------------------------------------------------------------------
|
|
|
bool cmDocumentation::PrintDocumentationProperties(std::ostream& os)
|
|
|
{
|