Skip to content

Use a common object library to avoid repeated compilation when building C++ tests #3397

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

Open
wants to merge 1 commit into
base: branch-25.08
Choose a base branch
from

Conversation

ttnghia
Copy link
Collaborator

@ttnghia ttnghia commented May 29, 2025

Currently, building each test executable involves compiling all the source files from cudf::cudftestutil_impl. That is because cudf::cudftestutil_impl is just an interface library that does not compile but just provides a list of source files. This PR adds an object library that compiles these source files, allowing them to be compiled just once instead of compiled for every build of a test executable.

Closes #2506.


Example of compiling column_utilities.cu from cudf::cudftestutil_impl:

Before:

cat build.ninja | grep column_utilities.cu.o: | wc -l
17

That means the file is compiled 17 times.

After:

cat build.ninja | grep column_utilities.cu.o: | wc -l
1

@ttnghia ttnghia self-assigned this May 29, 2025
@ttnghia ttnghia added the build label May 29, 2025
@ttnghia
Copy link
Collaborator Author

ttnghia commented May 29, 2025

build

@ttnghia ttnghia linked an issue May 29, 2025 that may be closed by this pull request
@ttnghia ttnghia requested a review from pxLi June 3, 2025 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use native test common lib to reduce compilation times
1 participant