mirror of
https://github.com/oxen-io/oxen-storage-server.git
synced 2023-12-13 21:00:26 +01:00
4a514a107e
This is a nice C++ wrapper that cleans up the data interface considerably over using the C sqlite3 API. I also evaluated (and started implementing) sqlite_orm for this, but ran into considerable obstacles: the orm components get in the way without being good enough to really solve anything (and essentially just making you write queries in C++ code that is much less elegant than straight queries), plus it fundamentally doesn't support threaded operation, which sucks.
19 lines
1 KiB
CMake
19 lines
1 KiB
CMake
# Source version, download location, hash for sqlite3.
|
|
#
|
|
# This gets used both in the full StaticBuild code *and* in the general build code when the system
|
|
# sqlite3 version is too old.
|
|
|
|
set(SQLITE3_VERSION "3350500" CACHE STRING "sqlite3 version")
|
|
set(SQLITE3_MIRROR ${LOCAL_MIRROR} https://www.sqlite.org/2021
|
|
CACHE STRING "sqlite3 download mirror(s)")
|
|
set(SQLITE3_SOURCE sqlite-autoconf-${SQLITE3_VERSION}.tar.gz)
|
|
set(SQLITE3_HASH SHA512=039af796f79fc4517be0bd5ba37886264d49da309e234ae6fccdb488ef0109ed2b917fc3e6c1fc7224dff4f736824c653aaf8f0a37550c5ebc14d035cb8ac737
|
|
CACHE STRING "sqlite3 source hash")
|
|
|
|
if(SQLITE3_VERSION MATCHES "^([0-9]+)(0([0-9])|([1-9][0-9]))(0([0-9])|([1-9][0-9]))[0-9][0-9]$")
|
|
set(SQLite3_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_3}${CMAKE_MATCH_4}.${CMAKE_MATCH_6}${CMAKE_MATCH_7}" CACHE STRING "" FORCE)
|
|
mark_as_advanced(SQLite3_VERSION)
|
|
message(STATUS "Building static sqlite3 ${SQLite3_VERSION}")
|
|
else()
|
|
message(FATAL_ERROR "Couldn't figure out sqlite3 version from '${SQLITE3_VERSION}'")
|
|
endif()
|