From 921ff012636c99f9f8bce946a29cb4d158621a20 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 21 Oct 2025 00:22:49 +0200 Subject: [PATCH] cmake: two minor tidy-ups - flatten an if tree. - fix a typo in comment. Closes #19171 --- CMake/PickyWarnings.cmake | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CMake/PickyWarnings.cmake b/CMake/PickyWarnings.cmake index bdd226e924..d46c878d46 100644 --- a/CMake/PickyWarnings.cmake +++ b/CMake/PickyWarnings.cmake @@ -29,12 +29,10 @@ set(_picky_nocheck "") # not to pass to feature checks if(CURL_WERROR) if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24) set(CMAKE_COMPILE_WARNING_AS_ERROR ON) - else() - if(MSVC) - list(APPEND _picky_nocheck "-WX") - else() # llvm/clang and gcc style options - list(APPEND _picky_nocheck "-Werror") - endif() + elseif(MSVC) + list(APPEND _picky_nocheck "-WX") + else() # llvm/clang and gcc-style options + list(APPEND _picky_nocheck "-Werror") endif() if((CMAKE_C_COMPILER_ID STREQUAL "GNU" AND