2016-09-27 19:01:08 +00:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2011-02-18 17:11:51 +00:00
|
|
|
#ifndef cmCTestUploadCommand_h
|
|
|
|
#define cmCTestUploadCommand_h
|
|
|
|
|
2017-08-25 18:39:02 +00:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2016-04-29 13:40:20 +00:00
|
|
|
|
2016-08-24 20:01:40 +00:00
|
|
|
#include "cmCTestHandlerCommand.h"
|
2019-07-04 16:14:22 +00:00
|
|
|
#include "cmCommand.h"
|
2016-08-24 20:01:40 +00:00
|
|
|
|
2019-03-18 21:25:50 +00:00
|
|
|
#include <set>
|
2016-08-24 20:01:40 +00:00
|
|
|
#include <string>
|
2019-07-04 16:14:22 +00:00
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
#include "cm_memory.hxx"
|
2016-08-24 20:01:40 +00:00
|
|
|
|
|
|
|
class cmCTestGenericHandler;
|
2011-02-18 17:11:51 +00:00
|
|
|
|
|
|
|
/** \class cmCTestUpload
|
|
|
|
* \brief Run a ctest script
|
|
|
|
*
|
|
|
|
* cmCTestUploadCommand defines the command to upload result files for
|
|
|
|
* the project.
|
|
|
|
*/
|
|
|
|
class cmCTestUploadCommand : public cmCTestHandlerCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* This is a virtual constructor for the command.
|
|
|
|
*/
|
2019-07-04 16:14:22 +00:00
|
|
|
std::unique_ptr<cmCommand> Clone() override
|
2016-05-16 14:34:04 +00:00
|
|
|
{
|
2019-07-04 16:14:22 +00:00
|
|
|
auto ni = cm::make_unique<cmCTestUploadCommand>();
|
2011-02-18 17:11:51 +00:00
|
|
|
ni->CTest = this->CTest;
|
|
|
|
ni->CTestScriptHandler = this->CTestScriptHandler;
|
2019-07-04 16:14:22 +00:00
|
|
|
return std::unique_ptr<cmCommand>(std::move(ni));
|
2016-05-16 14:34:04 +00:00
|
|
|
}
|
2011-02-18 17:11:51 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of the command as specified in CMakeList.txt.
|
|
|
|
*/
|
2017-09-15 13:56:26 +00:00
|
|
|
std::string GetName() const override { return "ctest_upload"; }
|
2011-02-18 17:11:51 +00:00
|
|
|
|
2019-09-04 16:03:01 +00:00
|
|
|
using Superclass = cmCTestHandlerCommand;
|
2011-02-18 17:11:51 +00:00
|
|
|
|
|
|
|
protected:
|
2017-09-15 13:56:26 +00:00
|
|
|
cmCTestGenericHandler* InitializeHandler() override;
|
2011-02-18 17:11:51 +00:00
|
|
|
|
2017-09-15 13:56:26 +00:00
|
|
|
bool CheckArgumentKeyword(std::string const& arg) override;
|
|
|
|
bool CheckArgumentValue(std::string const& arg) override;
|
2011-02-18 17:11:51 +00:00
|
|
|
|
2011-03-10 20:56:55 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
ArgumentDoingFiles = Superclass::ArgumentDoingLast1,
|
2016-07-28 19:12:43 +00:00
|
|
|
ArgumentDoingCaptureCMakeError,
|
2011-03-10 20:56:55 +00:00
|
|
|
ArgumentDoingLast2
|
|
|
|
};
|
|
|
|
|
2019-03-18 21:25:50 +00:00
|
|
|
std::set<std::string> Files;
|
2011-02-18 17:11:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|