93448529ac777cf9bb9f4989645514e26bd894a5
[platform/upstream/cmake.git] / Source / CTest / cmCTestCoverageCommand.h
1 /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2    file Copyright.txt or https://cmake.org/licensing for details.  */
3 #pragma once
4
5 #include "cmConfigure.h" // IWYU pragma: keep
6
7 #include <string>
8 #include <utility>
9 #include <vector>
10
11 #include <cm/memory>
12
13 #include "cmCTestHandlerCommand.h"
14 #include "cmCommand.h"
15
16 class cmCTestGenericHandler;
17
18 /** \class cmCTestCoverage
19  * \brief Run a ctest script
20  *
21  * cmCTestCoverageCommand defineds the command to test the project.
22  */
23 class cmCTestCoverageCommand : public cmCTestHandlerCommand
24 {
25 public:
26   /**
27    * This is a virtual constructor for the command.
28    */
29   std::unique_ptr<cmCommand> Clone() override
30   {
31     auto ni = cm::make_unique<cmCTestCoverageCommand>();
32     ni->CTest = this->CTest;
33     ni->CTestScriptHandler = this->CTestScriptHandler;
34     return std::unique_ptr<cmCommand>(std::move(ni));
35   }
36
37   /**
38    * The name of the command as specified in CMakeList.txt.
39    */
40   std::string GetName() const override { return "ctest_coverage"; }
41
42 protected:
43   void BindArguments() override;
44   void CheckArguments(std::vector<std::string> const& keywords) override;
45   cmCTestGenericHandler* InitializeHandler() override;
46
47   bool LabelsMentioned;
48   std::vector<std::string> Labels;
49 };