1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include <cmConfigure.h> // IWYU pragma: keep
12 /** \class cmExecutionStatus
13 * \brief Superclass for all command status classes
15 * when a command is involked it may set values on a command status instance
17 class cmExecutionStatus
20 cmExecutionStatus(cmMakefile& makefile)
22 , Error("unknown error.")
26 cmMakefile& GetMakefile() { return this->Makefile; }
28 void SetError(std::string const& e) { this->Error = e; }
29 std::string const& GetError() const { return this->Error; }
31 void SetReturnInvoked()
33 this->Variables.clear();
34 this->ReturnInvoked = true;
36 void SetReturnInvoked(std::vector<std::string> variables)
38 this->Variables = std::move(variables);
39 this->ReturnInvoked = true;
41 bool GetReturnInvoked() const { return this->ReturnInvoked; }
42 const std::vector<std::string>& GetReturnVariables() const
44 return this->Variables;
47 void SetBreakInvoked() { this->BreakInvoked = true; }
48 bool GetBreakInvoked() const { return this->BreakInvoked; }
50 void SetContinueInvoked() { this->ContinueInvoked = true; }
51 bool GetContinueInvoked() const { return this->ContinueInvoked; }
53 void SetNestedError() { this->NestedError = true; }
54 bool GetNestedError() const { return this->NestedError; }
59 bool ReturnInvoked = false;
60 bool BreakInvoked = false;
61 bool ContinueInvoked = false;
62 bool NestedError = false;
63 std::vector<std::string> Variables;