-
-
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
prevent GCC flags propagating to NVCC #2430
Conversation
We are still keeping our CMake minimum requirement pretty low (at least for this release). We should double-check that this does not rely on recent CMake versions. |
I'm afraid there are a bunch of problems here:
|
It is actually supported by Visual studio https://gitlab.kitware.com/cmake/cmake/merge_requests/1657 and https://gitlab.kitware.com/cmake/cmake/issues/17435. If we want to support old cmake versions, maybe we can do a bunch of if else ( |
Yes, I think we should add a version check, we can not just break the config file for the users of old CMake.
I hope this is not a wide-spread use case to link CUDA targets against PCL. If there will be people complaining, there is a workaround: link the "old way" against "raw" libraries @SergioRAgostinho what do you think? |
I'm ok with the version check. I'm not sure I fully understand
because of inexperience with compiling CUDA targets. But if there's a workaround I assume I don't need to worry much.
My next goal is C++14. I was hoping to bump the min CMake version to 3.1 to support |
It just struck me that before 3.8 a special command was used to create CUDA targets, and this command did not respect transitive properties anyway. So everything should be fine with the users of old CMake as long as we add guards.
I think we can lift minimum requirements for our dependencies. The reasoning would be: we are going for C++14 => oldest Ubuntu LTS that supports it is 16.04 => use this as a baseline. This means, among other things, that we can require CMake 3.5. But I think we can have a separate issue for deciding on the baseline and versions after the release. |
@taketwo @SergioRAgostinho What is the decision for this PR? Does something like
work? |
LGTM. And after the release we will lift CMake requirement and drop the first branch. |
Now I fully got the "transitive properties" and why setting compiler language to cxx won't create a problem before or after 3.8. @jasjuang I also believe that should solve it. Go for it. |
@taketwo @SergioRAgostinho Just pushed the approved change. Please merge! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this closes it for this release then 👏 Now it's closing up.
#2439 please also |
Hello, I tried the workaround mentioned above, use
instead of
but this does not work (I think fPIC flag comes from |
With the merge of #2100 now all the compile definitions got carried along when
target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES})
is called, however we don't want these definitions to be propagated to CUDA files because NVCC can't recognize it. This PR prevents this problem.