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.
This commit is contained in:
dundargoc authored and dundargoc committed 2024-01-14 15:55:38 +01:00
1 parent e5ff71fbbf
commit 310fb2efc3
1 file changed
+4
+4
View File
@@ -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
$<$<CONFIG:Release>:-Wno-unused-result>
$<$<CONFIG:RelWithDebInfo>:-Wno-unused-result>