summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorleha-bot <leha-bot@yandex.ru>2024-01-02 18:11:43 (GMT)
committerleha-bot <leha-bot@yandex.ru>2024-01-16 07:41:31 (GMT)
commit9f6c937408e7680a6b6bc01e13b4efe8aeca4623 (patch)
tree99fbbdb01c02db4edab7d42bbfba767125bbd94c
parent1082b9cb9a51749dd24a866cc18798434c2eaff5 (diff)
downloadCMake-9f6c937408e7680a6b6bc01e13b4efe8aeca4623.zip
CMake-9f6c937408e7680a6b6bc01e13b4efe8aeca4623.tar.gz
CMake-9f6c937408e7680a6b6bc01e13b4efe8aeca4623.tar.bz2
Source/cmake.h: Add ScriptModeExitCode for proper storing exit code
From executed CMake script in SCRIPT_MODE.
-rw-r--r--Source/cmake.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 58f90c9..ccf5154 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -835,7 +835,13 @@ private:
std::string DebuggerDapLogFile;
#endif
+ cm::optional<int> ScriptModeExitCode;
+
public:
+ bool HasScriptModeExitCode() const { return ScriptModeExitCode.has_value(); }
+ void SetScriptModeExitCode(int code) { ScriptModeExitCode = code; }
+ int GetScriptModeExitCode() const { return ScriptModeExitCode.value_or(-1); }
+
static cmDocumentationEntry CMAKE_STANDARD_OPTIONS_TABLE[18];
};