From 3d9d5046467dffe1ba7a22c89c67bf7b6632d9c2 Mon Sep 17 00:00:00 2001 From: leha-bot Date: Tue, 2 Jan 2024 21:13:26 +0300 Subject: cmMakefile: Store the exit code from cmExecutionStatus to cmake instance --- Source/cmMakefile.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 936b282..36bd69b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -898,6 +898,11 @@ void cmMakefile::RunListFile(cmListFile const& listFile, if (cmSystemTools::GetFatalErrorOccurred()) { break; } + if (status.HasExitCode()) { + // cmake_language EXIT was requested, early break. + this->GetCMakeInstance()->SetScriptModeExitCode(status.GetExitCode()); + break; + } if (status.GetReturnInvoked()) { this->RaiseScope(status.GetReturnVariables()); // Exit early due to return command. -- cgit v0.12