cmake/Source/CTest/cmCTestStartCommand.h

64 lines
1.6 KiB
C
Raw Normal View History

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
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
#include <iosfwd>
#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;
/** \class cmCTestStart
* \brief Run a ctest script
*
* cmCTestStartCommand defineds the command to start the nightly testing.
*/
class cmCTestStartCommand : public cmCTestCommand
{
public:
2010-03-17 14:00:29 +02:00
cmCTestStartCommand();
/**
* 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<cmCTestStartCommand>();
ni->CTest = this->CTest;
ni->CTestScriptHandler = this->CTestScriptHandler;
2010-03-17 14:00:29 +02:00
ni->CreateNewTag = this->CreateNewTag;
2015-08-17 11:37:30 +02:00
ni->Quiet = this->Quiet;
2020-02-01 23:06:01 +01:00
return std::unique_ptr<cmCommand>(std::move(ni));
2016-07-09 11:21:54 +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;
2010-03-17 14:00:29 +02:00
/**
* Will this invocation of ctest_start create a new TAG file?
*/
2016-07-09 11:21:54 +02:00
bool ShouldCreateNewTag() { return this->CreateNewTag; }
2010-03-17 14:00:29 +02:00
2015-08-17 11:37:30 +02:00
/**
* Should this invocation of ctest_start output non-error messages?
*/
2016-07-09 11:21:54 +02:00
bool ShouldBeQuiet() { return this->Quiet; }
2015-08-17 11:37:30 +02:00
2010-03-17 14:00:29 +02:00
private:
bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
bool CreateNewTag;
2015-08-17 11:37:30 +02:00
bool Quiet;
};