forked from oyama/pico-sqlite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
73 lines (69 loc) · 1.96 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
cmake_minimum_required(VERSION 3.13...3.27)
project(sqlite3 C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
pico_sdk_init()
# SQLite3 library
add_library(libsqlite3 INTERFACE)
target_sources(libsqlite3 INTERFACE
src/sqlite3.c
src/fallback.c
)
target_include_directories(libsqlite3 INTERFACE src)
target_compile_options(libsqlite3 INTERFACE
-Os
-Wno-unused-parameter -Wno-implicit-fallthrough -Wno-char-subscripts
-Wno-unused-but-set-variable -Wno-missing-field-initializers
-Wno-unused-variable -Wno-unused-value
-DPICO_SDK=1
-DHAVE_NANOSLEEP=0
$<$<CONFIG:Debug>:-DSQLITE_DEBUG>
#-DSQLITE_OS_OTHER
-DSQLITE_SMALL_STACK=1
-DSQLITE_ENABLE_MEMSYS5
-DSQLITE_DEFAULT_MMAP_SIZE=0
-DSQLITE_DEFAULT_PAGE_SIZE=512
-DSQLITE_DEFAULT_CACHE_SIZE=-1
-DSQLITE_DEFAULT_WORKER_THREADS=0
-DSQLITE_DEFAULT_LOCKING_MODE=1
-DSQLITE_DEFAULT_SYNCHRONOUS=2
-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1
-DSQLITE_MAX_EXPR_DEPTH=0
-DSQLITE_DISABLE_DIRSYNC=1
-DSQLITE_DISABLE_LFS=1
-DSQLITE_ENABLE_LOCKING_STYLE=0
#-DSQLITE_MAX_MEMORY=131072
-DSQLITE_MAX_MEMORY=87381
-DSQLITE_MAX_MMAP_SIZE=0
-DSQLITE_MAX_WORKER_THREADS=0
#-DSQLITE_OMIT_AUTOINCREMENT
-DSQLITE_OMIT_AUTOINIT
-DSQLITE_OMIT_AUTHORIZATION
-DSQLITE_OMIT_BUILTIN_TEST
-DSQLITE_OMIT_DEPRECATED
-DSQLITE_OMIT_DECLTYPE
-DSQLITE_OMIT_JSON
-DSQLITE_OMIT_LOAD_EXTENSION
-DSQLITE_OMIT_LOCALTIME
-DSQLITE_OMIT_POPEN
-DSQLITE_OMIT_PROGRESS_CALLBACK
-DSQLITE_OMIT_RANDOMNESS
-DSQLITE_OMIT_SHARED_CACHE
-DSQLITE_OMIT_TRACE
-DSQLITE_OMIT_UTF16
-DSQLITE_OMIT_WAL
-DSQLITE_OMIT_TCL_VARIABLE
-DSQLITE_OMIT_QUICKBALANCE
-DSQLITE_OMIT_LOOKASIDE
-DSQLITE_ENABLE_MEMORY_MANAGEMENT
#-DSQLITE_DEFAULT_MEMSTATUS=0
-DSQLITE_ZERO_MALLOC
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS
-DSQLITE_TEMP_STORE=1
-DSQLITE_THREADSAFE=1
-DSQLITE_MUTEX_NOOP=1
-DSQLITE_UNTESTABLE
-DSQLITE_ENABLE_MEMORY_MANAGEMENT=1
-DSQLITE_ENABLE_API_ARMOR
)
target_link_libraries(libsqlite3 INTERFACE pico_stdlib)