1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04: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:
Marcel Raad 2017-07-18 18:31:41 +02:00
parent 26e02eae4b
commit 54aef857b3
No known key found for this signature in database
GPG Key ID: 33C416EFAE4D6F02

View File

@ -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")