summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-06-08 20:06:33 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-06-08 20:06:33 (GMT)
commite37f8e2964e8415892eb31dce4c462173e95f69f (patch)
tree71aa497bb50233407b22d7c318aee1b18285c815 /Source/cmDocumentation.cxx
parentd1c4a0bf9ee0851a576aea6af72b20222144f830 (diff)
downloadCMake-e37f8e2964e8415892eb31dce4c462173e95f69f.zip
CMake-e37f8e2964e8415892eb31dce4c462173e95f69f.tar.gz
CMake-e37f8e2964e8415892eb31dce4c462173e95f69f.tar.bz2
STYLE: create command documentation for ctest
I think some of the cmake commands should be removed from ctest if possible, like add_executable etc. Alex
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r--Source/cmDocumentation.cxx31
1 files changed, 17 insertions, 14 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 12c451a..16ae84b 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -301,28 +301,31 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os)
//----------------------------------------------------------------------------
bool cmDocumentation::CreateModulesSection()
{
- this->ModulesSection.Append(cmDocumentationModulesHeader[0]);
std::string cmakeModules = this->CMakeRoot;
cmakeModules += "/Modules";
cmsys::Directory dir;
dir.Load(cmakeModules.c_str());
- for(unsigned int i = 0; i < dir.GetNumberOfFiles(); ++i)
+ if (dir.GetNumberOfFiles() > 0)
{
- std::string fname = dir.GetFile(i);
- if(fname.length() > 6)
+ this->ModulesSection.Append(cmDocumentationModulesHeader[0]);
+ for(unsigned int i = 0; i < dir.GetNumberOfFiles(); ++i)
{
- if(fname.substr(fname.length()-6, 6) == ".cmake")
+ std::string fname = dir.GetFile(i);
+ if(fname.length() > 6)
{
- std::string moduleName = fname.substr(0, fname.length()-6);
- std::string path = cmakeModules;
- path += "/";
- path += fname;
- this->CreateSingleModule(path.c_str(), moduleName.c_str());
+ if(fname.substr(fname.length()-6, 6) == ".cmake")
+ {
+ std::string moduleName = fname.substr(0, fname.length()-6);
+ std::string path = cmakeModules;
+ path += "/";
+ path += fname;
+ this->CreateSingleModule(path.c_str(), moduleName.c_str());
+ }
}
- }
- }
- cmDocumentationEntry e = { 0, 0, 0 };
- this->ModulesSection.Append(e);
+ }
+ cmDocumentationEntry e = { 0, 0, 0 };
+ this->ModulesSection.Append(e);
+ }
return true;
}