2016-10-30 18:24:19 +01:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2021-09-14 00:13:48 +02:00
|
|
|
#pragma once
|
2008-10-12 18:41:06 +02:00
|
|
|
|
2018-01-26 17:06:56 +01:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2016-10-30 18:24:19 +01:00
|
|
|
|
|
|
|
#include <string>
|
2020-02-01 23:06:01 +01:00
|
|
|
#include <utility>
|
2016-10-30 18:24:19 +01:00
|
|
|
#include <vector>
|
|
|
|
|
2020-02-01 23:06:01 +01:00
|
|
|
#include <cm/memory>
|
|
|
|
|
|
|
|
#include "cmCTestCommand.h"
|
|
|
|
#include "cmCommand.h"
|
|
|
|
|
2016-10-30 18:24:19 +01:00
|
|
|
class cmExecutionStatus;
|
2008-10-12 18:41:06 +02:00
|
|
|
|
|
|
|
/** \class cmCTestRunScript
|
|
|
|
* \brief Run a ctest script
|
|
|
|
*
|
|
|
|
* cmLibrarysCommand defines a list of executable (i.e., test)
|
|
|
|
* programs to create.
|
|
|
|
*/
|
|
|
|
class cmCTestRunScriptCommand : public cmCTestCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmCTestRunScriptCommand() {}
|
2013-03-16 19:13:01 +02:00
|
|
|
|
2008-10-12 18:41:06 +02:00
|
|
|
/**
|
|
|
|
* This is a virtual constructor for the command.
|
|
|
|
*/
|
2020-02-01 23:06:01 +01:00
|
|
|
std::unique_ptr<cmCommand> Clone() override
|
2016-07-09 11:21:54 +02:00
|
|
|
{
|
2020-02-01 23:06:01 +01:00
|
|
|
auto ni = cm::make_unique<cmCTestRunScriptCommand>();
|
2008-10-12 18:41:06 +02:00
|
|
|
ni->CTest = this->CTest;
|
|
|
|
ni->CTestScriptHandler = this->CTestScriptHandler;
|
2020-02-01 23:06:01 +01:00
|
|
|
return std::unique_ptr<cmCommand>(std::move(ni));
|
2016-07-09 11:21:54 +02:00
|
|
|
}
|
2008-10-12 18:41:06 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2016-10-30 18:24:19 +01:00
|
|
|
bool InitialPass(std::vector<std::string> const& args,
|
2018-01-26 17:06:56 +01:00
|
|
|
cmExecutionStatus& status) override;
|
2008-10-12 18:41:06 +02:00
|
|
|
};
|