Skip to content
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

Open
wants to merge 3 commits into
base: branch-24.12
Choose a base branch
from

Conversation

lamarrr
Copy link

@lamarrr lamarrr commented Oct 14, 2024

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

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@lamarrr lamarrr requested a review from a team as a code owner October 14, 2024 21:37
@lamarrr lamarrr requested a review from harrism October 14, 2024 21:37
@github-actions github-actions bot added cmake Related to CMake code or build configuration libcuspatial Relates to the cuSpatial C++ library labels Oct 14, 2024
@lamarrr lamarrr requested a review from a team as a code owner October 14, 2024 21:56
@lamarrr lamarrr requested a review from trxcllnt October 14, 2024 21:56
Copy link
Member

@harrism harrism left a 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)
Copy link
Member

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?

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Related to CMake code or build configuration libcuspatial Relates to the cuSpatial C++ library
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants