cmCTestUploadCommand.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 cmCTestUploadCommand_h
  4. #define cmCTestUploadCommand_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 cmCTestUpload
  14. * \brief Run a ctest script
  15. *
  16. * cmCTestUploadCommand defines the command to upload result files for
  17. * the project.
  18. */
  19. class cmCTestUploadCommand : public cmCTestHandlerCommand
  20. {
  21. public:
  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<cmCTestUploadCommand>();
  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_upload"; }
  36. using Superclass = cmCTestHandlerCommand;
  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. ArgumentDoingFiles = Superclass::ArgumentDoingLast1,
  44. ArgumentDoingCaptureCMakeError,
  45. ArgumentDoingLast2
  46. };
  47. std::set<std::string> Files;
  48. };
  49. #endif