summaryrefslogtreecommitdiffstats
path: root/Source/ctest.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/ctest.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/ctest.cxx')
-rw-r--r--Source/ctest.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 346977c..b7d207f 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -21,6 +21,7 @@
#include "cmake.h"
#include "cmDocumentation.h"
+#include "CTest/cmCTestScriptHandler.h"
//----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] =
@@ -236,11 +237,18 @@ int main (int argc, char *argv[])
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