summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.cxx
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-03-29 18:28:30 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-10 19:14:34 (GMT)
commit588dcb33b7ff089a84ce5cbacf2696b4a3646b42 (patch)
tree33fd43e30550fdf09440d76b7d6d75a13eb21d58 /Source/cmDocumentation.cxx
parent4e039a9a9814fd13142ae2c9876420ddf2414b8e (diff)
downloadCMake-588dcb33b7ff089a84ce5cbacf2696b4a3646b42.zip
CMake-588dcb33b7ff089a84ce5cbacf2696b4a3646b42.tar.gz
CMake-588dcb33b7ff089a84ce5cbacf2696b4a3646b42.tar.bz2
cmake: Provide guidance when an invalid -G option is given
Print a list of generators if no generator or an invalid one is supplied. Signed-off-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r--Source/cmDocumentation.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 8c17536..4f34755 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -138,6 +138,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os)
return this->PrintHelpListVariables(os);
case cmDocumentation::ListPolicies:
return this->PrintHelpListPolicies(os);
+ case cmDocumentation::ListGenerators:
+ return this->PrintHelpListGenerators(os);
case cmDocumentation::Version:
return this->PrintVersion(os);
case cmDocumentation::OldCustomModules:
@@ -817,6 +819,19 @@ bool cmDocumentation::PrintHelpListPolicies(std::ostream& os)
}
//----------------------------------------------------------------------------
+bool cmDocumentation::PrintHelpListGenerators(std::ostream& os)
+{
+ std::map<std::string,cmDocumentationSection*>::iterator si;
+ si = this->AllSections.find("Generators");
+ if(si != this->AllSections.end())
+ {
+ this->Formatter.SetIndent(" ");
+ this->Formatter.PrintSection(os, *si->second);
+ }
+ return true;
+}
+
+//----------------------------------------------------------------------------
bool cmDocumentation::PrintHelpOneVariable(std::ostream& os)
{
std::string vname = cmSystemTools::HelpFileName(this->CurrentArgument);