From 387b496b4f68e045af699055083768343b690970 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 23 Oct 2026 18:04:54 -0400 Subject: [PATCH] cmake: Avoid else-after-exit --- Source/cmake.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 41a325feb0..f69c185798 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1543,11 +1543,11 @@ void cmake::SetArgs(std::vector const& args) if (!parsedCorrectly) { cmSystemTools::Error("Run 'cmake --help' for all supported options."); exit(1); - } else if (!matched && cmHasPrefix(arg, '-')) { - possibleUnknownArg = arg; - } else if (!matched) { - bool parsedDirectory = this->SetDirectoriesFromFile(arg); - if (!parsedDirectory) { + } + if (!matched) { + if (cmHasPrefix(arg, '-')) { + possibleUnknownArg = arg; + } else if (!this->SetDirectoriesFromFile(arg)) { extraProvidedPath = arg; } }