mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:03:31 +03:00
cmake: stop deleting -W<n> from CMAKE_C_FLAGS (MSVC)
1. `CMAKE_C_FLAGS` may apply to other projects, and deleting/altering it may be unexpected. 2. We pass `-W4`/`-Wall` internally now, which do override custom `-W<n>` options in all supported MSVC versions. (as tested with Visual Studio generators) Ref: https://ci.appveyor.com/project/curlorg/curl/builds/51945416 Follow-up toe86542038d#17047 Ref:866e02935d#1711 Closes #17179
This commit is contained in:
parent
5acba8bc36
commit
1e9b48c010
1 changed files with 1 additions and 3 deletions
|
|
@ -52,9 +52,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# Use the highest warning level for Visual Studio.
|
||||
string(REGEX REPLACE "[/-]W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
list(APPEND _picky "-W4")
|
||||
list(APPEND _picky "-W4") # Use the highest warning level for Visual Studio.
|
||||
elseif(BORLAND)
|
||||
list(APPEND _picky "-w-") # Disable warnings on Borland to avoid changing 3rd party code.
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue