summaryrefslogtreecommitdiffstats
path: root/Source/cmBlockCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-02-13 21:45:43 (GMT)
committerBrad King <brad.king@kitware.com>2024-02-14 13:51:48 (GMT)
commit86698eea854bb779dd45f067a05fdad6068561e7 (patch)
treecdf8d903855cc85549078b30887180d1f9955b4f /Source/cmBlockCommand.cxx
parenta3033d1a063c0f9611c71738e9116f78d04daf97 (diff)
downloadCMake-86698eea854bb779dd45f067a05fdad6068561e7.zip
CMake-86698eea854bb779dd45f067a05fdad6068561e7.tar.gz
CMake-86698eea854bb779dd45f067a05fdad6068561e7.tar.bz2
cmake_language: Fix EXIT inside control flow blocks
These were missed in commit 1bb1769235 (cmake_language: Add EXIT subcommand, 2024-01-05, v3.29.0-rc1~112^2). Fixes: #25674
Diffstat (limited to 'Source/cmBlockCommand.cxx')
-rw-r--r--Source/cmBlockCommand.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmBlockCommand.cxx b/Source/cmBlockCommand.cxx
index 42f1ad3..5bf7bed 100644
--- a/Source/cmBlockCommand.cxx
+++ b/Source/cmBlockCommand.cxx
@@ -127,6 +127,10 @@ bool cmBlockFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
inStatus.SetContinueInvoked();
return true;
}
+ if (status.HasExitCode()) {
+ inStatus.SetExitCode(status.GetExitCode());
+ return true;
+ }
if (cmSystemTools::GetFatalErrorOccurred()) {
return true;
}