From c9e5b080cb42e96a1fe7b07922079aab9201a071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Hoz=C3=A1k?= Date: Wed, 4 Sep 2019 14:54:25 +0200 Subject: [PATCH] Disable cast-function-type warning when building internal sqlite Disables cast-function-type warning which is available in gcc 8.0 and greater. --- sqlite3/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sqlite3/CMakeLists.txt b/sqlite3/CMakeLists.txt index 7ba796d0..b1000894 100644 --- a/sqlite3/CMakeLists.txt +++ b/sqlite3/CMakeLists.txt @@ -15,6 +15,11 @@ if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Cla set_target_properties(sqlite3 PROPERTIES COMPILE_FLAGS "-fPIC") endif (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")) -if (UNIX AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) - target_compile_options(sqlite3 PRIVATE "-Wimplicit-fallthrough=0") +if (UNIX AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) + target_compile_options(sqlite3 PRIVATE "-Wimplicit-fallthrough=0") + endif() + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0) + target_compile_options(sqlite3 PRIVATE "-Wno-cast-function-type") + endif() endif()