1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-07 07:12:34 +02:00
audacity/cmake-proxies/sqlite/CMakeLists.txt
Leland Lucius 93d9303c3d AUP3: Many corrections and (safe) speed ups
This reenables synchronous mode by default.  However, for processing
where a power cut or crash can be tolerated, synchronous and journaling
are disabled.  Once the processing is complete, they are reenabled.

Types of processing that are like this are "Save As", "Backup Project",
and "Vacuuming". They all write to a separate project file while
running, so the real project file is safe.

Unfortunately, effects are back to be slow and sluggish.

I believe I've address all of the weird file corruption issues and
I'll continue to continue testing for these.
2020-07-17 16:17:42 -05:00

60 lines
1.5 KiB
CMake

add_library( ${TARGET} STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
# sqlite
${TARGET_ROOT}/sqlite3.c
${TARGET_ROOT}/sqlite3.h
)
list( APPEND INCLUDES
PUBLIC
${TARGET_ROOT}
)
list( APPEND DEFINES
PRIVATE
#
# Connection based settings. Persistent settings are done in the
# schema.
#
SQLITE_DEFAULT_LOCKING_MODE=1
SQLITE_DEFAULT_WAL_AUTOCHECKPOINT=100
SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=50000000
# Can't be set after a WAL mode database is initialized, so change
# the default here to ensure all project files get the same page
# size.
SQLITE_DEFAULT_PAGE_SIZE=65536
#
# Recommended in SQLite docs
#
SQLITE_DQS=0
SQLITE_DEFAULT_MEMSTATUS=0
SQLITE_DEFAULT_SYNCHRONOUS=1
SQLITE_DEFAULT_WAL_SYNCHRONOUS=1
SQLITE_LIKE_DOESNT_MATCH_BLOBS
SQLITE_MAX_EXPR_DEPTH=0
SQLITE_OMIT_DEPRECATED
SQLITE_OMIT_SHARED_CACHE
SQLITE_USE_ALLOCA
SQLITE_OMIT_AUTOINIT
$<$<BOOL:${HAVE_FDATASYNC}>:HAVE_FDATASYNC>
$<$<BOOL:${HAVE_GMTIME_R}>:HAVE_GMTIME_R>
$<$<BOOL:${HAVE_ISNAN}>:HAVE_ISNAN>
$<$<BOOL:${HAVE_LOCALTIME_R}>:HAVE_LOCALTIME_R>
$<$<BOOL:${HAVE_LOCALTIME_S}>:HAVE_LOCALTIME_S>
)
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
target_sources( ${TARGET} PRIVATE ${SOURCES} )
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )