From 6bee73532e8cef157e4a5d752b585369df56c6b8 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 5 Feb 2022 14:13:05 +0100 Subject: [PATCH] smesh: suppress -Wcast-function-type --- src/3rdParty/salomesmesh/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/3rdParty/salomesmesh/CMakeLists.txt b/src/3rdParty/salomesmesh/CMakeLists.txt index 9f53ee423a..09ebc66f22 100644 --- a/src/3rdParty/salomesmesh/CMakeLists.txt +++ b/src/3rdParty/salomesmesh/CMakeLists.txt @@ -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)