summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2007-11-29 15:23:26 (GMT)
committerKen Martin <ken.martin@kitware.com>2007-11-29 15:23:26 (GMT)
commitad581280a5cc37c18e05e6972fbb8c64f826279d (patch)
tree21b866d8eff485e8684c71306b12ca07ff0267ff /Source/cmDocumentation.cxx
parent0d5e854e9115fd08564ee97fdca28b6ae4beabb5 (diff)
downloadCMake-ad581280a5cc37c18e05e6972fbb8c64f826279d.zip
CMake-ad581280a5cc37c18e05e6972fbb8c64f826279d.tar.gz
CMake-ad581280a5cc37c18e05e6972fbb8c64f826279d.tar.bz2
BUG: fix single module generation
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r--Source/cmDocumentation.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 4b75f5c..c05d62d 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -1059,17 +1059,23 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os)
}
}
- if(!moduleName.empty()
- && this->CreateSingleModule(moduleName.c_str(),
+ if(!moduleName.empty())
+ {
+ cmDocumentationSection *sec =
+ new cmDocumentationSection("Standard CMake Modules", "MODULES");
+ this->AllSections["Modules"] = sec;
+ if (this->CreateSingleModule(moduleName.c_str(),
this->CurrentArgument.c_str(),
*this->AllSections["Modules"]))
- {
- this->PrintDocumentationCommand
- (os, this->AllSections["Modules"]->GetEntries()[0]);
- os << "\n Defined in: ";
- os << moduleName << "\n";
- return true;
+ {
+ this->PrintDocumentationCommand
+ (os, this->AllSections["Modules"]->GetEntries()[0]);
+ os << "\n Defined in: ";
+ os << moduleName << "\n";
+ return true;
+ }
}
+
// Argument was not a module. Complain.
os << "Argument \"" << this->CurrentArgument.c_str()
<< "\" to --help-module is not a CMake module.\n";