1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCTestCoverageCommand.h,v $
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
31 cmCTestCoverageCommand();
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
;
45 * The name of the command as specified in CMakeList.txt.
47 virtual const char* GetName() { return "ctest_coverage";}
50 * Succinct documentation.
52 virtual const char* GetTerseDocumentation()
54 return "Collect coverage tool results.";
60 virtual const char* GetFullDocumentation()
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 "
69 "The LABELS option filters the coverage report to include only "
70 "source files labeled with at least one of the labels specified."
72 CTEST_COMMAND_APPEND_OPTION_DOCS
;
75 cmTypeMacro(cmCTestCoverageCommand
, cmCTestHandlerCommand
);
78 cmCTestGenericHandler
* InitializeHandler();
80 virtual bool CheckArgumentKeyword(std::string
const& arg
);
81 virtual bool CheckArgumentValue(std::string
const& arg
);
85 ArgumentDoingLabels
= Superclass::ArgumentDoingLast1
,
90 std::set
<cmStdString
> Labels
;