Fix CMake warnings about deprecated target SQLite::SQLite3#135
Merged
Conversation
Owner
|
Thanks for the fix. FYI, I am still on CMake 3.31 |
Contributor
Author
|
Well, in my case I am using Fedora 44, which defaults to CMake 4.3.0, and it actually updated to that version even without asking me whether I want that update. Well, it probably did ask at some point, but I just confirmed the update without checking what is actually being installed :-) BTW I strongly suspect that the other build error, which I get when it tries to build the sqlpp core tests is caused at least partially by the new CMake version too. I am still investigating it and hopefully will find a fix (or at least a workaround) today. |
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.
Trying to build sqlpp23 with CMake 4.3.0 and the following command line
will show a whole bunch of repeating warnings saying the following
The CMake script that searches for SQLite3 and creates the targets is not provided by SQLite3 but comes with CMake itself, so I checked the source code at https://github.com/Kitware/CMake/blob/master/Modules/FindSQLite3.cmake
and the comments in the script pretty much confirmed what the comments say: with CMake 4.3.0 or newer the target should be
SQLite3::SQLite3instead of the oldSQLite::SQLite3So this fix checks the CMake version and uses the appropriate target.