Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / CTest / cmCTestCoverageCommand.h
blobf8792dace40eb4ed23e440c22840b4c186964e1b
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCTestCoverageCommand.h,v $
5 Language: C++
6 Date: $Date: 2009-03-05 15:17:42 $
7 Version: $Revision: 1.9 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmCTestCoverageCommand_h
18 #define cmCTestCoverageCommand_h
20 #include "cmCTestHandlerCommand.h"
22 /** \class cmCTestCoverage
23 * \brief Run a ctest script
25 * cmCTestCoverageCommand defineds the command to test the project.
27 class cmCTestCoverageCommand : public cmCTestHandlerCommand
29 public:
31 cmCTestCoverageCommand();
33 /**
34 * This is a virtual constructor for the command.
36 virtual cmCommand* Clone()
38 cmCTestCoverageCommand* ni = new cmCTestCoverageCommand;
39 ni->CTest = this->CTest;
40 ni->CTestScriptHandler = this->CTestScriptHandler;
41 return ni;
44 /**
45 * The name of the command as specified in CMakeList.txt.
47 virtual const char* GetName() { return "ctest_coverage";}
49 /**
50 * Succinct documentation.
52 virtual const char* GetTerseDocumentation()
54 return "Collect coverage tool results.";
57 /**
58 * More documentation.
60 virtual const char* GetFullDocumentation()
62 return
63 " ctest_coverage([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n"
64 " [LABELS label1 [label2 [...]]])\n"
65 "Perform the coverage of the given build directory and stores results "
66 "in Coverage.xml. The second argument is a variable that will hold "
67 "value."
68 "\n"
69 "The LABELS option filters the coverage report to include only "
70 "source files labeled with at least one of the labels specified."
71 "\n"
72 CTEST_COMMAND_APPEND_OPTION_DOCS;
75 cmTypeMacro(cmCTestCoverageCommand, cmCTestHandlerCommand);
77 protected:
78 cmCTestGenericHandler* InitializeHandler();
80 virtual bool CheckArgumentKeyword(std::string const& arg);
81 virtual bool CheckArgumentValue(std::string const& arg);
83 enum
85 ArgumentDoingLabels = Superclass::ArgumentDoingLast1,
86 ArgumentDoingLast2
89 bool LabelsMentioned;
90 std::set<cmStdString> Labels;
94 #endif