summaryrefslogtreecommitdiffstats
path: root/Source/cmExecutionStatus.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-07 13:51:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-09-07 13:51:51 (GMT)
commita64aa9bd300b2df2441d8e07ec3e2afe3069b04e (patch)
treef5bd7f1904b224e701d6360194a524388d238727 /Source/cmExecutionStatus.h
parent15f3d6e87ae83559ad43255f19a8606d86ac4e95 (diff)
parent838a5fae23cba0c9acf922164ff89fb6883d0f96 (diff)
downloadCMake-a64aa9bd300b2df2441d8e07ec3e2afe3069b04e.zip
CMake-a64aa9bd300b2df2441d8e07ec3e2afe3069b04e.tar.gz
CMake-a64aa9bd300b2df2441d8e07ec3e2afe3069b04e.tar.bz2
Merge topic 'return-propagate-variables'
838a5fae23 return(): Propagate variables to result scope 8f0e1f2111 cmMakefile: add RaiseScope for list of variables Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Robert Maynard <robertjmaynard@gmail.com> Merge-request: !7634
Diffstat (limited to 'Source/cmExecutionStatus.h')
-rw-r--r--Source/cmExecutionStatus.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h
index 0feaedf..ced3548 100644
--- a/Source/cmExecutionStatus.h
+++ b/Source/cmExecutionStatus.h
@@ -5,6 +5,7 @@
#include <cmConfigure.h> // IWYU pragma: keep
#include <string>
+#include <vector>
class cmMakefile;
@@ -27,8 +28,21 @@ public:
void SetError(std::string const& e) { this->Error = e; }
std::string const& GetError() const { return this->Error; }
- void SetReturnInvoked() { this->ReturnInvoked = true; }
+ void SetReturnInvoked()
+ {
+ this->Variables.clear();
+ this->ReturnInvoked = true;
+ }
+ void SetReturnInvoked(std::vector<std::string> variables)
+ {
+ this->Variables = std::move(variables);
+ this->ReturnInvoked = true;
+ }
bool GetReturnInvoked() const { return this->ReturnInvoked; }
+ const std::vector<std::string>& GetReturnVariables() const
+ {
+ return this->Variables;
+ }
void SetBreakInvoked() { this->BreakInvoked = true; }
bool GetBreakInvoked() const { return this->BreakInvoked; }
@@ -46,4 +60,5 @@ private:
bool BreakInvoked = false;
bool ContinueInvoked = false;
bool NestedError = false;
+ std::vector<std::string> Variables;
};