diff --git a/src/Native/Unix/CMakeLists.txt b/src/Native/Unix/CMakeLists.txt index c5772c7e02c9..8abd691717b2 100644 --- a/src/Native/Unix/CMakeLists.txt +++ b/src/Native/Unix/CMakeLists.txt @@ -26,6 +26,12 @@ add_compile_options(-Wno-empty-translation-unit) add_compile_options(-Wno-cast-align) add_compile_options(-Wno-typedef-redefinition) add_compile_options(-Wno-c11-extensions) +if (HAVE_WNO_SIGN_CONVERSION) + add_compile_options(-Wno-sign-conversion) +endif() +if (HAVE_WNO_UNUSED_RESULT) + add_compile_options(-Wno-unused-result) +endif() add_compile_options(-I${CMAKE_CURRENT_SOURCE_DIR}/Common) add_compile_options(-I${CMAKE_CURRENT_BINARY_DIR}/Common) add_compile_options(-g) diff --git a/src/Native/Unix/configure.cmake b/src/Native/Unix/configure.cmake index 6756ea26a5e3..eeeee3fb4bb7 100644 --- a/src/Native/Unix/configure.cmake +++ b/src/Native/Unix/configure.cmake @@ -34,6 +34,8 @@ set(CMAKE_REQUIRED_FLAGS "-Werror -Wno-error=unused-value") check_c_compiler_flag(-Wno-alloca HAVE_WNO_ALLOCA) check_c_compiler_flag(-Wno-implicit-int-float-conversion HAVE_WNO_IMPLICIT_INT_FLOAT_CONVERSION) +check_c_compiler_flag(-Wno-sign-conversion HAVE_WNO_SIGN_CONVERSION) +check_c_compiler_flag(-Wno-unused-result HAVE_WNO_UNUSED_RESULT) # in_pktinfo: Find whether this struct exists check_include_files(