-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake: SQLITE_OMIT_LOAD_EXTENSION not properly set #495
Comments
I think for the first you can submit a PR to get it merged, however you need to check if the found sqlite is the current bundled. for the second option the same applies if using the bundled sqlite + having an option to change the value (default would be true) |
Thanks, I just submitted a PR.
the new option is only applied to the bundled
This makes sense if an sqlite compile option affects SQliteCpp, but if it's doesn't it's quite cumbersome to add an option for every available SQlite setting. But luckily there's a simpler solution: I can just call cmake_minimum_required(VERSION 3.12)
project(SQLiteCpp_ex1)
set(SQLITE_OMIT_LOAD_EXTENSION ON)
add_subdirectory(../../ SQLiteCpp)
add_executable(SQLiteCpp_ex1 main.cpp)
target_compile_definitions(sqlite3 PUBLIC
SQLITE_DQS=0
SQLITE_THREADSAFE=0
SQLITE_DEFAULT_MEMSTATUS=0
SQLITE_DEFAULT_WAL_SYNCHRONOUS=1
SQLITE_LIKE_DOESNT_MATCH_BLOBS
SQLITE_MAX_EXPR_DEPTH=0
SQLITE_OMIT_DEPRECATED
SQLITE_OMIT_PROGRESS_CALLBACK
SQLITE_OMIT_SHARED_CACHE
SQLITE_USE_ALLOCA
SQLITE_STRICT_SUBTYPE=1
)
target_link_libraries(SQLiteCpp_ex1 PUBLIC SQLiteCpp) Of SQlite's recommended compile time options, I had to remove a couple:
But that's fine by me. |
I'm fairly new to this project, so apologies if I'm overlooking something.
The main CMakeList.txt offers a
SQLITE_OMIT_LOAD_EXTENSION
options and sets it for theSQLiteCpp
project (here). However, it does not set it for[sqlite3](https://github.com/SRombauts/SQLiteCpp/tree/master/sqlite3)
So I think that in the
sqlite3
CMakeLists.txt this should be added:Also, a related question: the sqlite documentation lists some Recommended Compile-time Options. Can (some of) these be set in conjunction with SQLiteCpp? What's the best way to do this with CMake?
Thanks!
The text was updated successfully, but these errors were encountered: