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

[BUG]: Potential ODR violation in cuspatial test utils #1122

Open
isVoid opened this issue May 4, 2023 · 0 comments
Open

[BUG]: Potential ODR violation in cuspatial test utils #1122

isVoid opened this issue May 4, 2023 · 0 comments
Labels
bug Something isn't working Needs Triage Need team to review and classify

Comments

@isVoid
Copy link
Contributor

isVoid commented May 4, 2023

Version

23.06

On which installation method(s) does this occur?

Rapids-Compose

Describe the issue

ODR (one definition rule) says that each function should have only 1 definition. In cupsatial_test/column_factories.hpp coord_offset function has definition. If the function is used in multiple files within the same binary, this violates the ODR rule.

Currently each test utility maps to 1 binary, and there's no ODR violation. But if we want to organize the test by category, this ODR violation will emerge.

Solution is to move the definition to src, and separately compile the test utilities into cuspatial_testutil target and link test binaries to it.

Minimum reproducible example

In CMakeList.txt, create a configure a TEST that contains multiple distance test files (point_distance_test.cpp and point_linestring_distance_test.cpp), compile.

Relevant log output

No response

Environment details

No response

Other/Misc.

No response

@isVoid isVoid added bug Something isn't working Needs Triage Need team to review and classify labels May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs Triage Need team to review and classify
Projects
Status: Todo
Development

No branches or pull requests

1 participant