-
Notifications
You must be signed in to change notification settings - Fork 104
Add stdc++fs as a target link library for clang compiler on linux #144
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
Conversation
This change is needed to compile pluginlib package and packages which depend on it on linux clang compiler
Points to note
Testing done
|
This approach seems like it's trying to fix the test and not to identify the more general underlying requirement. What is the differentiating factor that requires this flag being added? Can you enumerate the cases, because at a glance at this looks like it should just be detecting linux an adding the additional compile flag? The previous flag was effectively selecting linux as osx runs clang by default and windows is vsbuild. |
Makes sense, I may be able to just update the check to verify that we are on linux. Will look into this now. |
Updated the PR with just a check for linux for linking experimental filesystem libraries. Also updated the check to linux while exporting the libraries. Experimental Filesystem is a linux specific concept rather than compiler specific. |
@nuclearsandwich and @tfoote, please let me know if you have any comments on the latest revision, thanks |
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.
One question about the CMake logic for long term *nix support. Once that is settled we'll need to run CI.
This change is necessary for building with Clang on Linux. The use of `UNIX AND NOT APPLE` is cribbed from a bunch of StackOverflow and CMake mailing list examples to cover non-Apple *nix cases which for ROS 2 today means Linux, basically. But in the future it could also mean NetBSD or FreeBSD, QNX, or NuttX as long as they provide libc++fs.
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.
Will merge as long as CI comes back green.
Thanks a lot for identifying and updating this. I locally tested it on ubuntu and the change looks good :) |
@bhatsach do you have any insight into the warnings that are coming back on the Linux Clang job? |
Because the warnings are in other packages and don't seem directly related to pluglinlib and the supported builds have no errors. I'm going to merge with the expectation that those interested in getting the clang on Linux builds fully green will do so. |
This change is needed to compile pluginlib package and packages which
depend on it on linux clang compiler