summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-12-15 14:19:23 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-12-15 14:19:23 (GMT)
commit4b0fd57bef650dd027460f9ed50fb2687f214645 (patch)
treed10b171259d44d2422352ab61080ad120f57deb9 /Source/cmDocumentation.cxx
parenteef9390dc68e8762dacce520451327e948547742 (diff)
downloadCMake-4b0fd57bef650dd027460f9ed50fb2687f214645.zip
CMake-4b0fd57bef650dd027460f9ed50fb2687f214645.tar.gz
CMake-4b0fd57bef650dd027460f9ed50fb2687f214645.tar.bz2
ENH: fix module documenation to handle bad docs and fix qt3 docs
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r--Source/cmDocumentation.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 74aadf5..079b1da 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -309,8 +309,9 @@ bool cmDocumentation::CreateSingleModule(const char* fname, const char* moduleNa
}
else
{
- if(text.length() < 2)
+ if(text.length() < 2 && brief.length() == 0)
{
+ std::cerr << text << " " << brief << "\n";
return false;
}
char* pname = strcpy(new char[strlen(moduleName)+1], moduleName);
@@ -321,7 +322,7 @@ bool cmDocumentation::CreateSingleModule(const char* fname, const char* moduleNa
this->ModuleStrings.push_back(pbrief);
cmDocumentationEntry e = { pname, pbrief, ptext };
this->ModulesSection.push_back(e);
- return false;
+ return true;
}
}
return true;
@@ -1001,9 +1002,10 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os)
cmakeModules += "/Modules/";
cmakeModules += this->SingleModuleName;
cmakeModules += ".cmake";
- if(cmSystemTools::FileExists(cmakeModules.c_str()))
+ if(cmSystemTools::FileExists(cmakeModules.c_str())
+ && this->CreateSingleModule(cmakeModules.c_str(),
+ this->SingleModuleName.c_str()))
{
- this->CreateSingleModule(cmakeModules.c_str(), this->SingleModuleName.c_str());
this->PrintDocumentationCommand(os, &this->ModulesSection[0]);
return true;
}