-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Make CUDA includes as system includes #2745
Comments
Something like
should do. |
It's not this easy. Reason: Include directory is already added via FindCUDA script of CMake
Tried already:
Idea: If include directory is already present as system include, Variant 2:
But non system variant is already bound to target. I can read all bound include directories via Any other good idea? |
The problem you are facing is because pcl is still using the old approach for CUDA in CMake, there is a modern approach to this. The modern approach:
As you can see the modern approach treats CUDA just like any other external libraries, you have total control of it, whereas the old approach will look like
as you can see the CUDA includes and libs are added implicitly, and there's no way for the downstream to treat the includes and links as |
@modern approach: I know this variant. We are using it in our project, but it requires CMake 3.9, but we can only raise minimum version to 3.5, because of ubuntu 16.04. Nevertheless: Your code is still to complicated. You don't even need
It's enough to:
Nope, because you need to trigger precompile CUDA files before normal compiler is running. So calling I created a issue at CMake repo. Event it won't help us, in case they fix it, but maybe they have an idea for a workaround. |
If we have to make it work with older CMake then I don't really know what to do at this point. You are right, in this minimal the If the cpp file has something like
|
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs. |
Pinging @haritha-j and @shrijitsingh99 who might run into issues due to this |
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs. |
were you able to solve this error? |
I checked it short: Seems not. On MSVC CUDA is included via |
Currently CUDA headers are not treated as system includes via CMake, but they should.
The text was updated successfully, but these errors were encountered: