From 310fb2efc36cb65cbbaf5bfc81595f301e98a8b7 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 14 Jan 2024 13:21:13 +0100 Subject: build: disable conversion warnings for older GCC versions The conversion warnings from GCC versions 10 and less give too many false positives and should be disabled. --- src/nvim/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 04072ffc3e..98a9301da6 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -117,6 +117,10 @@ elseif(MINGW) # Enable wmain target_link_libraries(nvim PRIVATE -municode) elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU") + if(CMAKE_C_COMPILER_VERSION VERSION_LESS 10) + target_compile_options(main_lib INTERFACE -Wno-conversion) + endif() + target_compile_options(main_lib INTERFACE -fno-common $<$:-Wno-unused-result> $<$:-Wno-unused-result> -- cgit