Skip to content

Commit 5b5ca14

Browse files
authored
Merge pull request #219 from zxey/patch-1
Disable cast-function-type warning when building internal sqlite
2 parents 629497e + c9e5b08 commit 5b5ca14

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)