-
Notifications
You must be signed in to change notification settings - Fork 484
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
Revamp CMake support #1118
base: master
Are you sure you want to change the base?
Revamp CMake support #1118
Conversation
Do you think we should wait for this before making SOCI 4.1.0 release or can we leave this change until a later 4.1.x? |
Well, it would probably be nice if 4.1 had this already, but it's more of a nice-to-have. So I guess you don't have to wait for this PR to be done. Unrelated to this PR, I would appreciate if #992 made it into 4.1 though :) |
7815446
to
c8d5da6
Compare
0b83bb8
to
e1e4433
Compare
e4b2e0d
to
39b9037
Compare
4ca0dd9
to
ed0ceab
Compare
Some library is said to be missing when running on 24.04. Might be an artifact of the specific container image we're using.
ed0ceab
to
b23bdfe
Compare
@vadz as the Windows CI demonstrates, CI will fail if I don't separate out the callback implementation. I think the most straightforward thing to do here would be to keep the separate implementation for this PR and then it can be removed after #1192 has been merged. Otherwise, I believe I have addressed all remaining review comments 👀 |
But AFAICS you didn't remove |
I won't have time to do it today, but if I can get back to this during the week-end: would you prefer to make a real merge or squash merge all the changes together (or something in between — but in this case you will need to do the rebase yourself)? |
No I didn't, because that's what #1192 already does and I didn't want to introduce partial mixing of PR changes.
I think given the magnitude of this PR, a real merge would be good as the commit history might turn out to be useful when blaming any of the touched code in the future (to get a feeling for why a given change was introduced). |
I'd rather do it here than add a new source file only to immediately delete it later. Any conflicts will just have to be resolved when applying the other PR later.
Yes, true, it's just that there are a lot of commits here and it seems like at least some of them are changed/replaced by later ones... But I guess we'll just have to live with this too. |
Alright, will do 👍
True. But sometimes this is the exact history of a changeset that one needs to see in order to understand why code lokks as it does today. So there is an upside as well :) |
Thanks for the update! I've tested this on my own system and I see a few (small?) problems:
|
Did some poking around and agree here; seems the MySQL header should be included directly with On my (Ubuntu 22.04) I'm seeing the following from
The I've noticed that both MySQL and MariaDB usage from C would directly |
The improved version should make sure to always print a found message (unless QUIET) is specified and it should respect externally specified MySQL_INCLUDE_DIRS etc. variables in cases in which MySQL is not found via vcpkg or pkg-config. The weird dance with SOCI_MYSQL_DIRECT_INCLUDE has also been dropped, assuming that the include path is always configured to allow a direct include of the mysql.h header.
Thanks for the feedback! With regards to the MySQL situation I have checked on my system again and indeed PkgConfig reports Furthermore, I have adapted the module to respect externally set
I don't revert the change as the way it works now is the canonical way how things work in most other CMake find modules. However, I have added a compatibility layer that will automatically translate between the old
Good catch! I'll update the docs accordingly (the same is true for Oracle and MySQL).
Whoops - I thought I had reverted all name changes. I'll do so now.
I'd recommend simply using To my knowledge I am up-to-date again in terms of addressing review comments. Let me know if I missed something! Finally, I have taken the liberty of adding a commit that updates the used FreeBSD version during CI to 14.2 as the 14.0 image is no longer available and therefore leads to the CI failing. If you prefer of doing this separately, I can simply remove that commit again but I was hoping that this PR gets merged soon-ish anyway and therefore it shouldn't matter. |
Great, thanks!
OK, this works too, thanks.
Thanks, this is probably a good advice, but I don't always CMake for building and I also suspect that I might be not the only one doing it like this, so it's still nice to avoid unnecessary changes.
I'll try to retest a.s.a.p., thanks again for your work!
Yes, it doesn't really matter and I do hope to merge it soon. |
Fixes #1115
Fixes #1152
Fixes #1122
Fixes #1094
Fixes #1159
Fixes #644
Fixes #1005
Fixes #1111
Fixes #1015
Fixes #929
Fixes #843
Fixes #456
Fixes #394
Fixes #208