cmake: two minor tidy-ups

- flatten an if tree.
- fix a typo in comment.

Closes #19171
This commit is contained in:
Viktor Szakats 2025-10-21 00:22:49 +02:00
parent dbff3eec45
commit 921ff01263
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View 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