mirror of
https://github.com/curl/curl.git
synced 2026-04-25 00:42:12 +03:00
CMake: fix CURL_WERROR for MSVC
When using CURL_WERROR in MSVC builds, the debug flags were overridden by the release flags and /WX got added twice in debug mode. Closes https://github.com/curl/curl/pull/1715
This commit is contained in:
parent
26e02eae4b
commit
54aef857b3
1 changed files with 1 additions and 1 deletions
|
|
@ -246,7 +246,7 @@ endif(BORLAND)
|
|||
if(CURL_WERROR)
|
||||
if(MSVC_VERSION)
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /WX")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_RELEASE} /WX")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX")
|
||||
else()
|
||||
# this assumes clang or gcc style options
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue