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