From e58563f704e1eaef853fe35cf5b2deb8ad5e5bdc Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Wed, 26 Jun 2019 15:06:59 +0300 Subject: [build] GCC 8.0 now implements 'cast-function-type' --- cmake/sqlite.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/sqlite.cmake b/cmake/sqlite.cmake index c38f36d23d..cc579b22ac 100644 --- a/cmake/sqlite.cmake +++ b/cmake/sqlite.cmake @@ -37,7 +37,11 @@ target_compile_options(sqlite ) if(CMAKE_COMPILER_IS_GNUCXX) - target_compile_options(sqlite PRIVATE "-Wno-bad-function-cast") + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0) + target_compile_options(sqlite PRIVATE "-Wno-cast-function-type") + else() + target_compile_options(sqlite PRIVATE "-Wno-bad-function-cast") + endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") target_compile_options(sqlite PRIVATE "-Wno-cast-function-type") endif() -- cgit v1.2.1