]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: two minor tidy-ups
authorViktor Szakats <commit@vsz.me>
Mon, 20 Oct 2025 22:22:49 +0000 (00:22 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 20 Oct 2025 23:08:04 +0000 (01:08 +0200)
- flatten an if tree.
- fix a typo in comment.

Closes #19171

CMake/PickyWarnings.cmake

index bdd226e9246ee01465ba8dbdcf4db064a179f349..d46c878d46b41c25fcfcd7188fb6afd3a7834cfb 100644 (file)
@@ -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