Repository navigation
database/sqlite: add CMake build support - #3856
Merged
Merged
Conversation
- Add database subdirectory to apps/CMakeLists.txt. - Add apps/database/CMakeLists.txt with nuttx_add_subdirectory() and nuttx_generate_kconfig(). - Add apps/database/sqlite/CMakeLists.txt to fetch SQLite release archive, generate amalgamation (sqlite3.c, sqlite3.h, and shell.c) via host configure and make, configure sqlite3 library target, and configure sqlite3 CLI application target. Assisted-by: Google Gemini Signed-off-by: Swatantra Yadav <[email protected]>
xiaoxiang781216
approved these changes
Oct 16, 2026
cederom
approved these changes
Oct 16, 2026
cederom
left a comment
Contributor
There was a problem hiding this comment.
Thank you @Swatantra-66 :-)
Please remember to always attach build and runtime logs.. from a real world hardware where possible :-)
acassis
approved these changes
Oct 16, 2026
Contributor
Author
|
Thank you @cederom for the review and advice :-) Thanks as well to @xiaoxiang781216 and @acassis for the reviews. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the CMake vs. Make build-system gap for
database/sqliteidentified in issue apache/nuttx#19549 ("[Analysis] CMake vs. Make Build-System Gap Analysis"):add_subdirectory(database)toapps/CMakeLists.txtin alphabetical order.apps/database/CMakeLists.txtinvokingnuttx_add_subdirectory()andnuttx_generate_kconfig(MENUDESC "Database")to automatically register the Database menu in Kconfig.apps/database/sqlite/CMakeLists.txt:if(CONFIG_LIB_SQLITE).version-${CONFIG_LIB_SQLITE_VERSION}via CMakeFetchContent.sqlite3.c,sqlite3.h, andshell.c) via host./configureandmake.nuttx_add_library(sqlite3 STATIC)with definitions (_HAVE_SQLITE_CONFIG_H,NDEBUG) and warning suppressions matching Makefile.nuttx_add_application(NAME sqlite3)with stack size${CONFIG_UTILS_SQLITE_STACKSIZE}and priority 100 whenCONFIG_UTILS_SQLITEis enabled.ADDITIONAL_CLEAN_FILES.Addresses apache/nuttx#19549
Impact
database/sqlite).sim:sqlite). GNU Make build remains completely untouched.Testing
cmake-format --check: Passed on all modified and newly created files.cmake-lint: Passed with 0 convention, style, or line-length warnings.codespell: Passed with 0 spelling errors.cvt2utf: Passed (valid UTF-8 and LF line terminators).checkpatch.sh -c -u -m -g: Passed with zero errors or warnings (✔️ All checks pass.).