diff options
author | Brad King <brad.king@kitware.com> | 2024-02-13 21:45:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-02-14 13:51:48 (GMT) |
commit | 86698eea854bb779dd45f067a05fdad6068561e7 (patch) | |
tree | cdf8d903855cc85549078b30887180d1f9955b4f /Source/cmWhileCommand.cxx | |
parent | a3033d1a063c0f9611c71738e9116f78d04daf97 (diff) | |
download | CMake-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/cmWhileCommand.cxx')
-rw-r--r-- | Source/cmWhileCommand.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index e80d1fc..6b454d7 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -105,6 +105,10 @@ bool cmWhileFunctionBlocker::Replay(std::vector<cmListFileFunction> functions, if (status.GetContinueInvoked()) { break; } + if (status.HasExitCode()) { + inStatus.SetExitCode(status.GetExitCode()); + return true; + } if (cmSystemTools::GetFatalErrorOccurred()) { return true; } |