cmCTestUploadCommand.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 <cm/string_view>
  10. #include "cmCTestHandlerCommand.h"
  11. #include "cmCommand.h"
  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. protected:
  37. void BindArguments() override;
  38. void CheckArguments(std::vector<cm::string_view> const&) override;
  39. cmCTestGenericHandler* InitializeHandler() override;
  40. std::vector<std::string> Files;
  41. };