mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-12 23:43:59 +03:00
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.
This commit is contained in:
1 parent
3d9d504646
commit
b62dcbf5d2
1 file changed
+6
@@ -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()) {
|
||||
|
||||
Reference in new issue
Block a user