-
Notifications
You must be signed in to change notification settings - Fork 24
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
CMAKE_NO_SYSTEM_FROM_IMPORTED #26
Comments
Well it's not quite that simple. The thing is that it is while it is easy in CMake to mark an include directory as system (both for a target and globally), there is no way to remove it afterwards. And this default setting makes it impossible to have a more granular decision what is classified as a system directory and what not. CMake also offers no way to disable this behaviour on individual targets, so we went with the solution first disable it (so that nothing is considered system) and then mark selected include directories as system again. The goal is that packages in your own workspace are not considered system. Firstly because they obviously aren't and secondly because this can mess with include order (because non-system include dirs are considered before system includes). However we probably have to reiterate the current solution. Enabling warnings in thirdparty libraries was certainly not our goal. Do you install your software to nonstandard locations? Locations like |
You're right, my third-party software is installed in |
FYI, this change was included in the latest ros foxy release and it seems it broke AutowareAuto framework build which also uses lanelet2 library: https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/issues/1461 |
The following line is creating problems in my project: https://github.com/KIT-MRT/mrt_cmake_modules/blob/master/cmake/mrt_cmake_modules-macros.cmake#L26
This tells CMake that all imported targets should have their INTERFACE_INCLUDE_DIRECTORIES not treated as SYSTEM-includes. This generates large amounts of warnings for me with other third-party software, e.g. Eigen or libtorch, when using stricter global compiler warning settings. I don't think a package like mrt_cmake_modules should set/override such global CMake settings. Maybe there is a better solution for this? My current workaround is to restore the default using
set(CMAKE_NO_SYSTEM_FROM_IMPORTED NO)
after importing mrt_cmake_modules (which is an implicit dependency of lanelet2 in my case).The text was updated successfully, but these errors were encountered: