aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
1 files changed, 1 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0629403dfe..213709cb8e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -172,11 +172,6 @@ if(CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DNDEBUG)
string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
endif()
-# Enable -Wconversion.
-if(NOT MSVC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow -Wconversion")
-endif()
-
# gcc 4.0+ sets _FORTIFY_SOURCE=2 automatically. This currently
# does not work with Neovim due to some uses of dynamically-sized structures.
# https://github.com/neovim/neovim/issues/223
@@ -264,7 +259,7 @@ if(MSVC)
add_definitions(-DWIN32)
else()
add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter
- -Wstrict-prototypes -std=gnu99)
+ -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion)
check_c_compiler_flag(-Wimplicit-fallthrough HAS_WIMPLICIT_FALLTHROUGH_FLAG)
if(HAS_WIMPLICIT_FALLTHROUGH_FLAG)