Skip to content

CMake: Replace deprecated SQLite::SQLite3 with SQLite3::SQLite3 - #7588

Merged
echoix merged 1 commit into
OSGeo:mainfrom
echoix:cmake4.3-sqlite3
Jul 2, 2026
Merged

echoix merged 1 commit into
OSGeo:mainfrom
echoix:cmake4.3-sqlite3

Conversation

@echoix

@echoix echoix commented Jun 20, 2026

Copy link
Copy Markdown
Member

In CMake 4.3+, the SQLite::SQLite3 is deprecated and throws messages. The docs page https://cmake.org/cmake/help/v4.3/module/FindSQLite3.html suggest using an add_library() alias to allow new name to compile on old versions.

In CMake 4.3+, the `SQLite::SQLite3` is deprecated and throws messages. The docs page https://cmake.org/cmake/help/v4.3/module/FindSQLite3.html suggest using an `add_library()` alias to allow new name to compile on old versions.
@echoix
echoix requested a review from nilason June 20, 2026 14:42
@github-actions github-actions Bot added database Related to database management module general CMake labels Jun 20, 2026
@echoix
echoix enabled auto-merge (squash) June 20, 2026 18:09
@echoix

echoix commented Jun 21, 2026

Copy link
Copy Markdown
Member Author

The warning message that this solves is with recent CMake versions, like 4.3.0:


CMake Warning (dev) at cmake/modules/build_module.cmake:228 (target_link_libraries):
  The library that is being linked to, SQLite::SQLite3, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target name SQLite::SQLite3 is deprecated.  Please use SQLite3::SQLite3
  instead.

Call Stack (most recent call first):
  cmake/modules/build_program.cmake:10 (build_module)
  cmake/modules/build_program_in_subdir.cmake:17 (build_program)
  db/drivers/CMakeLists.txt:98 (build_program_in_subdir)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/modules/build_module.cmake:228 (target_link_libraries):
  The library that is being linked to, SQLite::SQLite3, is marked as being
  deprecated by the owner.  The message provided by the developer is:

  The target name SQLite::SQLite3 is deprecated.  Please use SQLite3::SQLite3
  instead.

Call Stack (most recent call first):
  cmake/modules/build_program.cmake:10 (build_module)
  cmake/modules/build_program_in_subdir.cmake:17 (build_program)
  db/drivers/CMakeLists.txt:98 (build_program_in_subdir)
This warning is for project developers.  Use -Wno-dev to suppress it.

https://github.com/echoix/grass/actions/runs/27889599131/job/82530703834?pr=660#step:8:235

@echoix
echoix requested a review from wenzeslaus June 24, 2026 18:22

@nilason nilason left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@echoix
echoix merged commit 763b17e into OSGeo:main Jul 2, 2026
26 checks passed
@echoix
echoix deleted the cmake4.3-sqlite3 branch July 2, 2026 19:16
@github-actions github-actions Bot added this to the 8.6.0 milestone Jul 2, 2026
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Jul 7, 2026
…o#7588)

In CMake 4.3+, the `SQLite::SQLite3` is deprecated and throws messages. The docs page https://cmake.org/cmake/help/v4.3/module/FindSQLite3.html suggest using an `add_library()` alias to allow new name to compile on old versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake database Related to database management general module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants