-
Notifications
You must be signed in to change notification settings - Fork 918
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
Made cudftestutil header-only and removed GTest dependency #16839
Made cudftestutil header-only and removed GTest dependency #16839
Conversation
94dda22
to
e8c1059
Compare
@vyasr would you please take a look? Does this look like the right approach? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! This looks good. I changed the labels to mark this PR as breaking since it will affect all external consumers of cudftestutil.
Can you rebase this PR on branch-24.12? I'm approving assuming that you do that, and pending resolution of David's comments.
307c34c
to
08e2e67
Compare
…into cudftestutil-header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question about whether the targets are perhaps a bit redundant, at least at the consumer's end (it might still be cleaner to retain the separation on our end). I'm happy with the result either way, so I'm approving now.
The separate targets allow consumers the ability to optin to a subset of functionality without any code changes. So they can also write the logic to compile the subset of functions they want |
Co-authored-by: Robert Maynard <robertjmaynard@gmail.com>
I know this may sound silly but would you mind changing a few of the gtests to fail and make sure they fail like they are supposed to? The last time we attempted this kind of change we got some strange results from our gtests runs. Also include one of the large_strings tests as well. |
I've done that and can confirm they fail as they are supposed to |
/merge |
This merge request fixes the CMake linking logic to cudftestutil for branch-24.12, allowing you to specify which version of GTest/GBench to use as long as the API is source compatible. Follows up on: rapidsai/cudf#16839 Authors: - Basit Ayantunde (https://github.com/lamarrr) Approvers: - Mark Harris (https://github.com/harrism) - Bradley Dice (https://github.com/bdice) URL: #1475
Description
This merge request follows up on #16658.
It removes the dependency on GTest by cudftestutil. It satisfies the requirement that we only need API compatibility with the GTest API and we don't expose the GTest symbols to our consumers nor ship any binary artifact.
The source files defining the symbols are late-binded to the resulting executable (via library INTERFACE sources).
The user has to link to manually link the GTest and GMock libraries to the final executable as illustrated below.
Closes #16658
Usage
CMakeLists.txt:
Checklist