Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Remove usage of find_path to locate thrust/version.h #1749

Merged
merged 2 commits into from
Jul 27, 2022

Conversation

robertmaynard
Copy link
Collaborator

When a consumer of Thrust uses the CMake FIND_ROOT_PATH_MODE_INCLUDE option it will cause all find_path searches to only occur under the find root path. Since this normally doesn't include the source files, it means that thrust-header-search.cmake will fail to find the thrust/version.h file.

This issue was found when using conda-build on a project that includes Thrust, since conda-build sets up a cross compilation
enviornment including a find root path.

When a consumer of Thrust uses the CMake `FIND_ROOT_PATH_MODE_INCLUDE`
option it will cause all find_path searches to only occur under
the find root path. Since this normally doesn't include the
source files, it means that thrust-header-search.cmake will fail
to find the thrust/version.h file.

This issue was found when using conda-build on a project that
includes Thrust, since conda-build sets up a cross compilation
enviornment including a find root path.
@robertmaynard
Copy link
Collaborator Author

This change has also been proposed for both cub and libcudacxx

thrust/cmake/thrust-header-search.cmake Outdated Show resolved Hide resolved
@alliepiper
Copy link
Collaborator

run tests

@alliepiper alliepiper added type: bug: functional Does not work as intended. P1: should have Necessary, but not critical. only: cmake CMake changes only. Doesn't need internal NVIDIA CI. helps: rapids Helps or needed by RAPIDS. area: cmake Related to CMake infrastructure. labels Jul 20, 2022
@alliepiper alliepiper added this to the 2.0.0 milestone Jul 20, 2022
@alliepiper alliepiper added the testing: gpuCI in progress Started gpuCI testing. label Jul 20, 2022
@alliepiper
Copy link
Collaborator

run tests

@alliepiper alliepiper merged commit b9db373 into NVIDIA:main Jul 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: cmake Related to CMake infrastructure. helps: rapids Helps or needed by RAPIDS. only: cmake CMake changes only. Doesn't need internal NVIDIA CI. P1: should have Necessary, but not critical. testing: gpuCI in progress Started gpuCI testing. type: bug: functional Does not work as intended.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants