From f8f232bdd88ee71e008d79c4a50c986407c23a1d Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 14 Jan 2008 17:05:09 -0500 Subject: [PATCH] BUG: make -help-module-list work by filling the modules section first, also for custom modules Alex --- Source/cmDocumentation.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 4e0177f57..56c849807 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -346,6 +346,15 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os) this->PrintDocumentationList(os,"Compatibility Commands"); return true; case cmDocumentation::ModuleList: + // find the modules first, print the custom module docs only if + // any custom modules have been found actually, Alex + this->CreateCustomModulesSection(); + this->CreateModulesSection(); + if (this->AllSections.find("Custom CMake Modules") + != this->AllSections.end()) + { + this->PrintDocumentationList(os,"Custom CMake Modules"); + } this->PrintDocumentationList(os,"Modules"); return true; case cmDocumentation::PropertyList: