smesh: suppress -Wcast-function-type

This commit is contained in:
wmayer
2022-02-05 14:13:05 +01:00
parent d33cf1b3fe
commit 6bee73532e

View File

@@ -19,6 +19,13 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result")
endif ()
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-cast-function-type" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-function-type")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-cast-function-type")
endif ()
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-maybe-uninitialized" _flag_found)
if (_flag_found)