Update sqlite3 from 3.13 to 3.19.3 (2017-06-08)

Fix #125 Incompatibility in 3.19.0 using a new CMake variable SQLITE_USE_LEGACY_STRUCT
This commit is contained in:
Sébastien Rombauts 2017-07-18 12:54:33 +02:00
parent 078941cdb1
commit 1a2c7cbba7
5 changed files with 14812 additions and 8403 deletions

View File

@ -94,3 +94,7 @@ Version 2.0.0 - July 25 2016
Remove Column::errmsg() method : use Database or Statement equivalents Remove Column::errmsg() method : use Database or Statement equivalents
More unit tests, with code coverage status on the GitHub page More unit tests, with code coverage status on the GitHub page
Do not force MSVC to use static runtime if unit-tests are not build Do not force MSVC to use static runtime if unit-tests are not build
Version 2.1.0 - July 18 2017
Update SQLite3 from 3.13 to latest 3.19.3 (2017-06-08)

View File

@ -89,6 +89,12 @@ if (SQLITE_ENABLE_ASSERT_HANDLER)
add_definitions(-DSQLITECPP_ENABLE_ASSERT_HANDLER) add_definitions(-DSQLITECPP_ENABLE_ASSERT_HANDLER)
endif (SQLITE_ENABLE_ASSERT_HANDLER) endif (SQLITE_ENABLE_ASSERT_HANDLER)
option(SQLITE_USE_LEGACY_STRUCT "Fallback to forward declaration of legacy struct sqlite3_value (pre SQLite 3.19)" OFF)
if (SQLITE_USE_LEGACY_STRUCT)
# Force forward declaration of legacy struct sqlite3_value (pre SQLite 3.19)
add_definitions(-DSQLITE_USE_LEGACY_STRUCT)
endif (SQLITE_USE_LEGACY_STRUCT)
## Build the C++ Wrapper ## ## Build the C++ Wrapper ##
@ -185,6 +191,12 @@ install(EXPORT ${PROJECT_NAME}Config DESTINATION lib/cmake/${PROJECT_NAME})
## Build provided copy of SQLite3 C library ## ## Build provided copy of SQLite3 C library ##
# TODO NOCOMMIT
#find_package(sqlite3)
#if(sqlite3_VERSION VERSION_LESS "3.19")
# set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
#endif()
option(SQLITECPP_INTERNAL_SQLITE "Add the internal SQLite3 source to the project." ON) option(SQLITECPP_INTERNAL_SQLITE "Add the internal SQLite3 source to the project." ON)
if (SQLITECPP_INTERNAL_SQLITE) if (SQLITECPP_INTERNAL_SQLITE)
# build the SQLite3 C library (for ease of use/compatibility) versus Linux sqlite3-dev package # build the SQLite3 C library (for ease of use/compatibility) versus Linux sqlite3-dev package

View File

@ -17,8 +17,13 @@
// Forward declarations to avoid inclusion of <sqlite3.h> in a header // Forward declarations to avoid inclusion of <sqlite3.h> in a header
struct sqlite3; struct sqlite3;
struct sqlite3_context; struct sqlite3_context;
#ifndef SQLITE_USE_LEGACY_STRUCT // Since SQLITE 3.19 (used by default since SQLiteCpp 2.1.0)
typedef struct sqlite3_value sqlite3_value;
#else // Before SQLite 3.19 (legacy struct forward declaration can be activated with CMake SQLITECPP_LEGACY_STRUCT var)
struct Mem; struct Mem;
typedef struct Mem sqlite3_value; typedef struct Mem sqlite3_value;
#endif
namespace SQLite namespace SQLite

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff