diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/sqlite.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
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() |