diff options
-rw-r--r-- | Source/cmMakefile.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
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. |