Skip to content

Commit

Permalink
Merge pull request #219 from zxey/patch-1
Browse files Browse the repository at this point in the history
Disable cast-function-type warning when building internal sqlite
  • Loading branch information
SRombauts authored Nov 18, 2019
2 parents 629497e + c9e5b08 commit 5b5ca14
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sqlite3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 5b5ca14

Please sign in to comment.