cmCTestCoverageCommand.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <string>
  6. #include <utility>
  7. #include <vector>
  8. #include <cm/memory>
  9. #include "cmCTestHandlerCommand.h"
  10. #include "cmCommand.h"
  11. class cmCTestGenericHandler;
  12. /** \class cmCTestCoverage
  13. * \brief Run a ctest script
  14. *
  15. * cmCTestCoverageCommand defineds the command to test the project.
  16. */
  17. class cmCTestCoverageCommand : public cmCTestHandlerCommand
  18. {
  19. public:
  20. /**
  21. * This is a virtual constructor for the command.
  22. */
  23. std::unique_ptr<cmCommand> Clone() override
  24. {
  25. auto ni = cm::make_unique<cmCTestCoverageCommand>();
  26. ni->CTest = this->CTest;
  27. ni->CTestScriptHandler = this->CTestScriptHandler;
  28. return std::unique_ptr<cmCommand>(std::move(ni));
  29. }
  30. /**
  31. * The name of the command as specified in CMakeList.txt.
  32. */
  33. std::string GetName() const override { return "ctest_coverage"; }
  34. protected:
  35. void BindArguments() override;
  36. void CheckArguments(std::vector<std::string> const& keywords) override;
  37. cmCTestGenericHandler* InitializeHandler() override;
  38. bool LabelsMentioned;
  39. std::vector<std::string> Labels;
  40. };