summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorleha-bot <leha-bot@yandex.ru>2024-01-05 01:21:48 (GMT)
committerleha-bot <leha-bot@yandex.ru>2024-01-16 07:41:31 (GMT)
commitb62dcbf5d2f99dd5f258be9955df6ed605657f70 (patch)
tree00dc7ab0201f2f22b43a68779283b94d1fdd4c25 /Source
parent3d9d5046467dffe1ba7a22c89c67bf7b6632d9c2 (diff)
downloadCMake-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.cxx6
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()) {