[cmake-commits] alex committed cmDocumentation.cxx 1.41 1.42
ctest.cxx 1.94 1.95
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jun 8 16:06:35 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv5859
Modified Files:
cmDocumentation.cxx ctest.cxx
Log Message:
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
Index: cmDocumentation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.cxx,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- cmDocumentation.cxx 6 Feb 2007 20:05:56 -0000 1.41
+++ cmDocumentation.cxx 8 Jun 2007 20:06:33 -0000 1.42
@@ -301,28 +301,31 @@
//----------------------------------------------------------------------------
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;
}
Index: ctest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/ctest.cxx,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- ctest.cxx 19 Mar 2007 17:04:10 -0000 1.94
+++ ctest.cxx 8 Jun 2007 20:06:33 -0000 1.95
@@ -21,6 +21,7 @@
#include "cmake.h"
#include "cmDocumentation.h"
+#include "CTest/cmCTestScriptHandler.h"
//----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] =
@@ -236,11 +237,18 @@
if(doc.CheckOptions(argc, argv) || nocwd)
{
// Construct and print requested documentation.
+ std::vector<cmDocumentationEntry> commands;
+ cmCTestScriptHandler* ch =
+ static_cast<cmCTestScriptHandler*>(inst.GetHandler("script"));
+ ch->CreateCMake();
+ ch->GetCommandDocumentation(commands);
+
doc.SetName("ctest");
doc.SetNameSection(cmDocumentationName);
doc.SetUsageSection(cmDocumentationUsage);
doc.SetDescriptionSection(cmDocumentationDescription);
doc.SetOptionsSection(cmDocumentationOptions);
+ doc.SetCommandsSection(&commands[0]);
doc.SetSeeAlsoList(cmDocumentationSeeAlso);
#ifdef cout
# undef cout
More information about the Cmake-commits
mailing list