Skip to content

Commit

Permalink
CMake: fix CURL_WERROR for MSVC
Browse files Browse the repository at this point in the history
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 #1715
  • Loading branch information
MarcelRaad committed Aug 4, 2017
1 parent 26e02ea commit 54aef85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 54aef85

Please sign in to comment.