summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r--Source/cmDocumentation.cxx132
1 files changed, 83 insertions, 49 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 07683d0..8f603f2 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -220,55 +220,7 @@ cmDocumentation::cmDocumentation()
:CurrentFormatter(0)
{
this->SetForm(TextForm);
-
- cmDocumentationSection *sec;
-
- sec = new cmDocumentationSection("Author","AUTHOR");
- sec->Append(cmDocumentationEntry
- (0,
- "This manual page was generated by the \"--help-man\" option.",
- 0));
- this->AllSections["Author"] = sec;
-
- sec = new cmDocumentationSection("Copyright","COPYRIGHT");
- sec->Append(cmDocumentationCopyright);
- this->AllSections["Copyright"] = sec;
-
- sec = new cmDocumentationSection("See Also","SEE ALSO");
- sec->Append(cmDocumentationStandardSeeAlso);
- this->AllSections["Standard See Also"] = sec;
-
- sec = new cmDocumentationSection("Options","OPTIONS");
- sec->Append(cmDocumentationStandardOptions);
- this->AllSections["Options"] = sec;
-
- sec = new cmDocumentationSection("Properties","PROPERTIES");
- sec->Append(cmPropertiesDocumentationDescription);
- this->AllSections["Properties Description"] = sec;
-
- sec = new cmDocumentationSection("Generators","GENERATORS");
- sec->Append(cmDocumentationGeneratorsHeader);
- this->AllSections["Generators"] = sec;
-
- sec = new cmDocumentationSection("Compatibility Commands",
- "COMPATIBILITY COMMANDS");
- sec->Append(cmCompatCommandsDocumentationDescription);
- this->AllSections["Compatibility Commands"] = sec;
-
-
- this->PropertySections.push_back("Properties of Global Scope");
- this->PropertySections.push_back("Properties on Directories");
- this->PropertySections.push_back("Properties on Targets");
- this->PropertySections.push_back("Properties on Tests");
- this->PropertySections.push_back("Properties on Source Files");
- this->PropertySections.push_back("Properties on Cache Entries");
-
- this->VariableSections.push_back("Variables that Provide Information");
- this->VariableSections.push_back("Variables That Change Behavior");
- this->VariableSections.push_back("Variables That Describe the System");
- this->VariableSections.push_back("Variables that Control the Build");
- this->VariableSections.push_back("Variables for Languages");
-
+ this->addCommonStandardDocSections();
this->ShowGenerators = true;
}
@@ -710,6 +662,88 @@ cmDocumentation::Form cmDocumentation::GetFormFromFilename(
}
//----------------------------------------------------------------------------
+void cmDocumentation::addCommonStandardDocSections()
+{
+ cmDocumentationSection *sec;
+
+ sec = new cmDocumentationSection("Author","AUTHOR");
+ sec->Append(cmDocumentationEntry
+ (0,
+ "This manual page was generated by the \"--help-man\" option.",
+ 0));
+ this->AllSections["Author"] = sec;
+
+ sec = new cmDocumentationSection("Copyright","COPYRIGHT");
+ sec->Append(cmDocumentationCopyright);
+ this->AllSections["Copyright"] = sec;
+
+ sec = new cmDocumentationSection("See Also","SEE ALSO");
+ sec->Append(cmDocumentationStandardSeeAlso);
+ this->AllSections["Standard See Also"] = sec;
+
+ sec = new cmDocumentationSection("Options","OPTIONS");
+ sec->Append(cmDocumentationStandardOptions);
+ this->AllSections["Options"] = sec;
+
+ sec = new cmDocumentationSection("Compatibility Commands",
+ "COMPATIBILITY COMMANDS");
+ sec->Append(cmCompatCommandsDocumentationDescription);
+ this->AllSections["Compatibility Commands"] = sec;
+}
+
+//----------------------------------------------------------------------------
+void cmDocumentation::addCMakeStandardDocSections()
+{
+ cmDocumentationSection *sec;
+
+ sec = new cmDocumentationSection("Properties","PROPERTIES");
+ sec->Append(cmPropertiesDocumentationDescription);
+ this->AllSections["Properties Description"] = sec;
+
+ sec = new cmDocumentationSection("Generators","GENERATORS");
+ sec->Append(cmDocumentationGeneratorsHeader);
+ this->AllSections["Generators"] = sec;
+
+ this->PropertySections.push_back("Properties of Global Scope");
+ this->PropertySections.push_back("Properties on Directories");
+ this->PropertySections.push_back("Properties on Targets");
+ this->PropertySections.push_back("Properties on Tests");
+ this->PropertySections.push_back("Properties on Source Files");
+ this->PropertySections.push_back("Properties on Cache Entries");
+
+ this->VariableSections.push_back("Variables that Provide Information");
+ this->VariableSections.push_back("Variables That Change Behavior");
+ this->VariableSections.push_back("Variables That Describe the System");
+ this->VariableSections.push_back("Variables that Control the Build");
+ this->VariableSections.push_back("Variables for Languages");
+
+}
+
+//----------------------------------------------------------------------------
+void cmDocumentation::addCTestStandardDocSections()
+{
+ cmDocumentationSection *sec;
+ // This is currently done for backward compatibility reason
+ // We may suppress some of these.
+ addCMakeStandardDocSections();
+}
+
+//----------------------------------------------------------------------------
+void cmDocumentation::addCPackStandardDocSections()
+{
+ cmDocumentationSection *sec;
+
+ sec = new cmDocumentationSection("Generators","GENERATORS");
+ sec->Append(cmDocumentationGeneratorsHeader);
+ this->AllSections["Generators"] = sec;
+
+ this->VariableSections.push_back(
+ "Variables common to all CPack generators");
+ this->VariableSections.push_back(
+ "Variables specific to a CPack generator");
+}
+
+//----------------------------------------------------------------------------
bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
const char* exitOpt)
{