Allow multiple find_package calls#1346
Closed
Krzmbrzl wants to merge 1 commit into
Closed
Conversation
We now only define our targets if they don't exist yet. Note that multiple calls to find_package(SOCI) that specify different components will cause all call-sides to use the superset of all requested components as targets are global (and hence also their link dependencies). Fixes SOCI#1344
Contributor
Author
Member
|
This was done by you in 9982e0c but I don't really know why :-/ Anyhow, I'll merge this, thanks. |
Contributor
Author
|
Oh wow xD I probably forgot about having to worry about this 🤦 Or maybe I thought it wouldn't be needed as imported targets are directory-scoped and hence the risk of collisions is drastically reduced. |
vadz
pushed a commit
that referenced
this pull request
Mar 19, 2026
We now only define our targets if they don't exist yet to avoid errors due to redefining them if find_package(SOCI) is done more than once. Note that multiple calls to find_package(SOCI) that specify different components will cause all call-sides to use the superset of all requested components as targets are global (and hence also their link dependencies). Fixes #1344. See #1346.
Member
|
Applied in the commit above, thanks again. |
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.
We now only define our targets if they don't exist yet.
Note that multiple calls to find_package(SOCI) that specify different components will cause all call-sides to use the superset of all requested components as targets are global (and hence also their link dependencies).
Fixes #1344