-
Notifications
You must be signed in to change notification settings - Fork 156
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
Updated libcudftestutil CMake linking logic for 24.12 #1475
Updated libcudftestutil CMake linking logic for 24.12 #1475
Conversation
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.
Just a question.
@@ -17,6 +17,25 @@ | |||
################################################################################################### | |||
# - compiler function ----------------------------------------------------------------------------- | |||
|
|||
add_library(cuspatial_test_common OBJECT test_common.cpp) |
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.
question: Why do we need a library with an empty source file that doesn't include anything?
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.
Two-fold:
- cmake doesn't allow adding an empty list of sources for a library.
- cudftestutil has been split into cudftestutil and cudftestutil_impl (cmake's INTERFACE sources), and they need to be linked to the executable. if we link to cudftestutil_impl for each test executable, we'll be paying the compilation cost repeatedly for each test compilation (due to source injection). instead, we create an object library called test_common and link to that, paying the compilation cost once.
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.
OK, thanks. Can you please document this in a comment?
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.
yeah, sure!
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.
Thanks. Late question: why can't this empty library object just be created at the cudf level, rather than in cuspatial?
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.
cudftestutil depends on gtest and gmock. cudf doesn't intend to ship a gtest binary artifact any longer and we want users to have the freedom to choose whichever gtest versions they intend to use as long as it's source-compatible.
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.
I'm approving so we can get this merged ASAP, but please document the reason for the empty source file / library.
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 all looks good to me. Let's merge when CI passes, to unblock other PRs.
I'm going to queue a merge for this, which will trigger once tests pass. The last commit (before docs) passed, so this one should pass as well. |
/merge |
Description
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
Checklist