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

install cmake bits to DATADIR instead of LIBDIR #825

Open
anbe42 opened this issue Dec 21, 2022 · 4 comments
Open

install cmake bits to DATADIR instead of LIBDIR #825

anbe42 opened this issue Dec 21, 2022 · 4 comments
Labels
thrust For all items related to Thrust.

Comments

@anbe42
Copy link

anbe42 commented Dec 21, 2022

thrust and cub are architecture-independent header-only libraries, therefore their *.cmake bits should be placed under /usr/share/cmake/ instead of /usr/lib*/cmake/ (which is the architecture dependent /usr/lib/<triplet>/cmake/ on Debian and derivatives).
Please switch from CMAKE_INSTALL_LIBDIR to CMAKE_INSTALL_DATADIR. This also avoids embedding an architecture-dependent path in the generated thrust-header-search.cmake and cub-header-search.cmake

@anbe42
Copy link
Author

anbe42 commented Dec 21, 2022

BTW, the repositories contain thrust-header-search.cmake and cub-header-search.cmake. These should probably be removed as they are to be generated from the corresponding *-header-search.cmake.in files instead.

This results in *-header-search.cmake being installed twice: first the stale copy from the source tree, then overwritten with the generated file from the build tree:

...
-- Installing: /tmp/cubtest2/usr/local/lib/cmake/cub/cub-header-search.cmake
-- Installing: /tmp/cubtest2/usr/local/lib/cmake/cub/cub-header-search.cmake.in
-- Installing: /tmp/cubtest2/usr/local/lib/cmake/cub/cub-header-search.cmake

@jrhemstad
Copy link
Collaborator

I'll need to defer to @allisonvacanti or @robertmaynard on this one.

@robertmaynard
Copy link
Contributor

BTW, the repositories contain thrust-header-search.cmake and cub-header-search.cmake. These should probably be removed as they are to be generated from the corresponding *-header-search.cmake.in files instead.

This results in *-header-search.cmake being installed twice: first the stale copy from the source tree, then overwritten with the generated file from the build tree:

...
-- Installing: /tmp/cubtest2/usr/local/lib/cmake/cub/cub-header-search.cmake
-- Installing: /tmp/cubtest2/usr/local/lib/cmake/cub/cub-header-search.cmake.in
-- Installing: /tmp/cubtest2/usr/local/lib/cmake/cub/cub-header-search.cmake

That double install has already been fixed on the main branch of thrust and cub ( NVIDIA/thrust#1825 )

@robertmaynard
Copy link
Contributor

thrust and cub are architecture-independent header-only libraries, therefore their *.cmake bits should be placed under /usr/share/cmake/ instead of /usr/lib*/cmake/ (which is the architecture dependent /usr/lib/<triplet>/cmake/ on Debian and derivatives). Please switch from CMAKE_INSTALL_LIBDIR to CMAKE_INSTALL_DATADIR. This also avoids embedding an architecture-dependent path in the generated thrust-header-search.cmake and cub-header-search.cmake

Switching to CMAKE_INSTALL_DATADIR will be a breaking change. Projects use variables likeTHRUST_ROOT_DIR to specify the location and that would fail, or people package Thrust as a sub-component and now the layout will change.

@jrhemstad jrhemstad added the thrust For all items related to Thrust. label Feb 22, 2023
@jarmak-nv jarmak-nv transferred this issue from NVIDIA/thrust Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
thrust For all items related to Thrust.
Projects
Status: No status
Development

No branches or pull requests

3 participants