fe155f670f2b74925040bba2b756fb910015926a
[platform/upstream/cmake.git] / Source / CTest / cmCTestUploadCommand.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 cmCTestUpload
19  * \brief Run a ctest script
20  *
21  * cmCTestUploadCommand defines the command to upload result files for
22  * the project.
23  */
24 class cmCTestUploadCommand : public cmCTestHandlerCommand
25 {
26 public:
27   /**
28    * This is a virtual constructor for the command.
29    */
30   std::unique_ptr<cmCommand> Clone() override
31   {
32     auto ni = cm::make_unique<cmCTestUploadCommand>();
33     ni->CTest = this->CTest;
34     ni->CTestScriptHandler = this->CTestScriptHandler;
35     return std::unique_ptr<cmCommand>(std::move(ni));
36   }
37
38   /**
39    * The name of the command as specified in CMakeList.txt.
40    */
41   std::string GetName() const override { return "ctest_upload"; }
42
43 protected:
44   void BindArguments() override;
45   void CheckArguments(std::vector<std::string> const&) override;
46   cmCTestGenericHandler* InitializeHandler() override;
47
48   std::vector<std::string> Files;
49 };