diff options
author | leha-bot <leha-bot@yandex.ru> | 2024-01-05 01:21:48 (GMT) |
---|---|---|
committer | leha-bot <leha-bot@yandex.ru> | 2024-01-16 07:41:31 (GMT) |
commit | b62dcbf5d2f99dd5f258be9955df6ed605657f70 (patch) | |
tree | 00dc7ab0201f2f22b43a68779283b94d1fdd4c25 /Source | |
parent | 3d9d5046467dffe1ba7a22c89c67bf7b6632d9c2 (diff) | |
download | CMake-b62dcbf5d2f99dd5f258be9955df6ed605657f70.zip CMake-b62dcbf5d2f99dd5f258be9955df6ed605657f70.tar.gz CMake-b62dcbf5d2f99dd5f258be9955df6ed605657f70.tar.bz2 |
cmMakefile: check cmake script mode exit code after command
Which potentially may set it, and forward it to the cmExecutionStatus
for proper handling in caller.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 36bd69b..6fb7734 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -529,6 +529,12 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, cmSystemTools::SetFatalErrorOccurred(); } } + if (this->GetCMakeInstance()->HasScriptModeExitCode() && + this->GetCMakeInstance()->GetWorkingMode() == cmake::SCRIPT_MODE) { + // pass-through the exit code from inner cmake_language(EXIT) , + // possibly from include() or similar command... + status.SetExitCode(this->GetCMakeInstance()->GetScriptModeExitCode()); + } } } else { if (!cmSystemTools::GetFatalErrorOccurred()) { |