2016-09-27 15:01:08 -04:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2008-01-23 10:28:26 -05:00
|
|
|
#ifndef cmExecutionStatus_h
|
|
|
|
#define cmExecutionStatus_h
|
|
|
|
|
2016-12-26 10:38:36 +01:00
|
|
|
#include <cmConfigure.h> // IWYU pragma: keep
|
2019-09-30 10:46:28 -04:00
|
|
|
|
2016-12-26 10:38:36 +01:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class cmMakefile;
|
|
|
|
|
2008-01-23 10:28:26 -05:00
|
|
|
/** \class cmExecutionStatus
|
|
|
|
* \brief Superclass for all command status classes
|
|
|
|
*
|
|
|
|
* when a command is involked it may set values on a command status instance
|
|
|
|
*/
|
2015-05-16 07:06:59 +02:00
|
|
|
class cmExecutionStatus
|
2008-01-23 10:28:26 -05:00
|
|
|
{
|
|
|
|
public:
|
2016-12-26 10:38:36 +01:00
|
|
|
cmExecutionStatus(cmMakefile& makefile)
|
|
|
|
: Makefile(makefile)
|
|
|
|
, Error("unknown error.")
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
cmMakefile& GetMakefile() { return this->Makefile; }
|
|
|
|
|
|
|
|
void SetError(std::string const& e) { this->Error = e; }
|
|
|
|
std::string const& GetError() const { return this->Error; }
|
|
|
|
|
2016-12-26 10:30:31 +01:00
|
|
|
void SetReturnInvoked() { this->ReturnInvoked = true; }
|
|
|
|
bool GetReturnInvoked() const { return this->ReturnInvoked; }
|
|
|
|
|
|
|
|
void SetBreakInvoked() { this->BreakInvoked = true; }
|
|
|
|
bool GetBreakInvoked() const { return this->BreakInvoked; }
|
|
|
|
|
|
|
|
void SetContinueInvoked() { this->ContinueInvoked = true; }
|
|
|
|
bool GetContinueInvoked() const { return this->ContinueInvoked; }
|
|
|
|
|
|
|
|
void SetNestedError() { this->NestedError = true; }
|
|
|
|
bool GetNestedError() const { return this->NestedError; }
|
2008-01-23 10:28:26 -05:00
|
|
|
|
2015-05-16 07:06:39 +02:00
|
|
|
private:
|
2016-12-26 10:38:36 +01:00
|
|
|
cmMakefile& Makefile;
|
|
|
|
std::string Error;
|
2018-11-21 23:17:54 +01:00
|
|
|
bool ReturnInvoked = false;
|
|
|
|
bool BreakInvoked = false;
|
|
|
|
bool ContinueInvoked = false;
|
|
|
|
bool NestedError = false;
|
2008-01-23 10:28:26 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|