cmCTestCoverageCommand.h 1.5 KB

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