cuspatial icon indicating copy to clipboard operation
cuspatial copied to clipboard

[BUG]: Potential ODR violation in cuspatial test utils

Open isVoid opened this issue 2 years ago • 0 comments

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 avatar May 04 '23 18:05 isVoid