Skip to content

Commit c9e5b08

Browse files
authored
Disable cast-function-type warning when building internal sqlite
Disables cast-function-type warning which is available in gcc 8.0 and greater.
1 parent 629497e commit c9e5b08

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

sqlite3/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Cla
1515
set_target_properties(sqlite3 PROPERTIES COMPILE_FLAGS "-fPIC")
1616
endif (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
1717

18-
if (UNIX AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
19-
target_compile_options(sqlite3 PRIVATE "-Wimplicit-fallthrough=0")
18+
if (UNIX AND CMAKE_COMPILER_IS_GNUCXX)
19+
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
20+
target_compile_options(sqlite3 PRIVATE "-Wimplicit-fallthrough=0")
21+
endif()
22+
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
23+
target_compile_options(sqlite3 PRIVATE "-Wno-cast-function-type")
24+
endif()
2025
endif()

0 commit comments

Comments
 (0)