summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-11-24 16:46:06 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-11-24 16:46:06 (GMT)
commit0ae07800557bef97c43ddd64f144b258b8fdd5dc (patch)
tree11e25227b2346357e92d9eb0f077d7c05ee313bc /Source
parentbb187903979d20c8b8a5ed07276c6af122bad781 (diff)
downloadCMake-0ae07800557bef97c43ddd64f144b258b8fdd5dc.zip
CMake-0ae07800557bef97c43ddd64f144b258b8fdd5dc.tar.gz
CMake-0ae07800557bef97c43ddd64f144b258b8fdd5dc.tar.bz2
BUG 9961: ctest --help should not display a Generators section
Diffstat (limited to 'Source')
-rw-r--r--Source/cmDocumentation.cxx7
-rw-r--r--Source/cmDocumentation.h4
-rw-r--r--Source/ctest.cxx1
3 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 93eb199..fc2fb14 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -267,6 +267,8 @@ cmDocumentation::cmDocumentation()
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->ShowGenerators = true;
}
//----------------------------------------------------------------------------
@@ -1279,7 +1281,10 @@ bool cmDocumentation::PrintDocumentationUsage(std::ostream& os)
this->ClearSections();
this->AddSectionToPrint("Usage");
this->AddSectionToPrint("Options");
- this->AddSectionToPrint("Generators");
+ if(this->ShowGenerators)
+ {
+ this->AddSectionToPrint("Generators");
+ }
this->Print(os);
return true;
}
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index 3a4a506..34b83b1 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -57,6 +57,8 @@ public:
/** Print help of the given type. */
bool PrintDocumentation(Type ht, std::ostream& os, const char* docname=0);
+
+ void SetShowGenerators(bool showGen) { this->ShowGenerators = showGen; }
/** Set the program name for standard document generation. */
void SetName(const char* name);
@@ -159,6 +161,8 @@ private:
const char* GetDefaultDocName(Type ht) const;
bool IsOption(const char* arg) const;
+ bool ShowGenerators;
+
std::string NameString;
std::string DocName;
std::map<std::string,cmDocumentationSection*> AllSections;
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index b0a0bd6..969e102 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -279,6 +279,7 @@ int main (int argc, char *argv[])
ch->CreateCMake();
ch->GetCommandDocumentation(commands);
+ doc.SetShowGenerators(false);
doc.SetName("ctest");
doc.SetSection("Name",cmDocumentationName);
doc.SetSection("Usage",cmDocumentationUsage);