-
Notifications
You must be signed in to change notification settings - Fork 46
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
[FEA] Make it easier to mark import system includes as non-system includes #95
Comments
Correction: NVCC implicitly adds the CUDA toolkit include directory as the last user include, not the first system include. That means if we can get CMake to specify the CUDA include as the last system include on the compile line we can ensure that a conda installed Thrust / libcuc++ will be selected instead. |
Currently CMake 3.23 is on track to provide a feature to make it easier for This would allow us to hang the
|
I think adding a wrapper around this is the best approach and should be doable for 22.02 Since we have #97 and #98 I don't think we have a need for a general solution for 21.12 |
Is your feature request related to a problem? Please describe.
Projects such as cudf, and rmm require newer versions of Thrust, libcuc++ than can be found in the oldest supported CUDA toolkit. This requires these components to install/packaged so that consumers use the same version.
This becomes challenging with CMake+NVCC due to the rules around import targets, and system includes and the default install layout packages like Thrust use.
For example when a projects installs Thrust to a conda env you end up with a layout that looks like:
This means that any project that specifies
conda/env/include
as a system path will capture thrust as a system path. Since CMake treats any include path specified on an import target asSYSTEM
this causes the thrust inside conda to be a system path as a side-effect.So why does that matter? Well compilers have specific rules on the order that includes are searched for headers. In general user includes are searched before any system includes going in the order provided. The issue is that NVCC injects the CUDA toollkit includes into the system include search order as the first entry. Therefore stopping discovery of another system included thrust.
Describe the solution you'd like
rapids-cmake should provide a general way to mark a targets includes as non-system with some
INCLUDE|EXCLUDE
regex filterThe text was updated successfully, but these errors were encountered: