aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-01-21 09:55:10 +0100
committerGitHub <noreply@github.com>2023-01-21 09:55:10 +0100
commit9a81ce68548df963ff92e95488ec966a4cb8e9c8 (patch)
treee27dbf896fd0be37c8f437410bdf115c7850bf78
parent7ef5e363d360f86c5d8d403e90ed256f4de798ec (diff)
downloadrneovim-9a81ce68548df963ff92e95488ec966a4cb8e9c8.tar.gz
rneovim-9a81ce68548df963ff92e95488ec966a4cb8e9c8.tar.bz2
rneovim-9a81ce68548df963ff92e95488ec966a4cb8e9c8.zip
build: bump MSVC warning to level two (#21890)
-rwxr-xr-xsrc/nvim/CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 6356335847..4d8e9c90bd 100755
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -89,8 +89,11 @@ if(ENABLE_IWYU)
endif()
if(MSVC)
- # XXX: /W4 gives too many warnings. #3241
- target_compile_options(main_lib INTERFACE -W1 -wd4311)
+ # TODO(dundargoc): bump warning level
+ target_compile_options(main_lib INTERFACE -W2)
+
+ # Disable warnings that give too many false positives.
+ target_compile_options(main_lib INTERFACE -wd4311 -wd4146)
target_compile_definitions(main_lib INTERFACE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE)
else()
target_compile_options(main_lib INTERFACE -Wall -Wextra -pedantic -Wno-unused-parameter
@@ -458,7 +461,7 @@ list(REMOVE_ITEM NVIM_SOURCES ${to_remove})
# xdiff, mpack, lua-cjson: inlined external project, we don't maintain it. #9306
if(MSVC)
set_source_files_properties(
- ${EXTERNAL_SOURCES} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} /wd4090")
+ ${EXTERNAL_SOURCES} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} /wd4090 /wd4244")
else()
set_source_files_properties(
${EXTERNAL_SOURCES} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-conversion -Wno-missing-noreturn -Wno-missing-format-attribute -Wno-double-promotion -Wno-strict-prototypes")