Comments (8)
this will be targeted post bouncy, removing the milestone.
from ament_cmake.
A CMake function with that functionality already exists: ament_include_directories_order
And it is already being used within ament_target_dependencies
:
Since the referenced PR collects the include directories manually the package needs to call ament_include_directories_order
manually.
@wjwwood Can this ticket be closed?
from ament_cmake.
Not relevant for the reported case of this ticket but after investigating another report I created #157 which fixes ament_include_directories_order
on non-Windows platforms.
from ament_cmake.
I think it could be closed if the workaround in ros2/rviz#243 were replaced with use of this function.
I think we ought to be using it everywhere, but that's a systemic issue.
from ament_cmake.
I think it could be closed if the workaround in ros2/rviz#243 were replaced with use of this function.
Do you want to keep this ticket open until that has been addressed in the rviz
repo? (If that isn't the case in the short term I would rather suggest creating a ticket in that repo instead.)
I think we ought to be using it everywhere, but that's a systemic issue.
Afaik we already do use ament_target_dependencies
in numerous places. So I don't think it is a systemic issue. If there are any cases where we don't please point them out so we can change them.
from ament_cmake.
Well, my original ask for this issue was to keep it open until the necessary feature was added and deployed in rviz and elsewhere:
Also, this new function should either be used everywhere or at least where it has been a problem before, and in either case the pr linked above should be fixed with this function as well.
I was unaware of the function and also unaware of any place where we were using it. I didn't realize we were using it in ament_target_dependencies()
, but does this work if you call it multiple times per target?
Also, searching for target_include_directories()
results in 204 matches across 83 files
. So discounting a few instances inside of pure cmake packages and within ament_cmake
, all of those cases could introduce a problem (as they are added outside of ament_target_dependencies
). include_directories
is less common, but is used in our googletest integration and in some random packages like laser_geometry
and qt_gui_core
, so those might an issue too (as I understand it).
Is there an example of how (or do you have an idea of how) to use this correctly when you need to add the include directory manually and with ament_target_dependencies
? Do we just make sure they come after (or maybe before) ament_target_dependencies
to avoid the issue?
At the very least we should address it in rviz. Since you suggested the fix in rviz originally (and because it's still a bit unclear to me how to do it along side ament_target_dependencies
), can you have a look at the follow up to use this method to avoid it?
from ament_cmake.
but does this work if you call it multiple times per target?
Each call is separate from each other. So only the dependencies from a single call are ordered relatively to each other. Separate calls are adding the information in the order of the calls.
Is there an example of how (or do you have an idea of how) to use this correctly when you need to add the include directory manually and with
ament_target_dependencies
?
I am not sure what kind of example you are looking for. If you need to call both functions they will add the information to the target in the order you call them. Just as if you would call target_include_directories
twice in vanilla CMake.
can you have a look at the follow up to use this method to avoid it?
I am sorry, but I simply don't have the bandwidth to start looking into making rviz
pull requests. The usage of the function should be really trivial: just call ament_target_dependencies
for all dependencies which adhere to the CMake variable "standard" and call vanilla CMake function for everything else afterwards (assuming those will be system dependencies).
from ament_cmake.
my original ask for this issue was to keep it open until the necessary feature was added and deployed in rviz and elsewhere:
I created ros2/ros2#658 to track the enhancement to use ament_target_dependencies
wherever possible / beneficial / necessary (just for a better scope of the items rather than having it hidden in this repo).
from ament_cmake.
Related Issues (20)
- ament_add_test default runner cannot handle Catch2 (or generalized) JUnit result files
- Regarding `ament_libraries_deduplicate` implementation HOT 1
- `ament_target_dependencies` does not link PCL properly HOT 2
- Backporting features from `ament_cmake_extension` to `ament_cmake_auto`
- add support for COMPONENTS in `ament_export_dependencies` HOT 2
- "Files to be generated by multiple different commands" Problem in Iron HOT 2
- Using install(DIRECTORY ... TYPE ...) results in "can't find error"
- Using install(DIRECTORY ... TYPE ...) results in "can't find error" HOT 1
- Resolving ament packages at build time HOT 4
- ament_vendor should be able to use mirror site of git HOT 2
- ament_vendor() does not install vendor project to correct path HOT 1
- How to install ament on ubuntu20.04? Or build front the source? HOT 1
- Question about `ament_export_include_directories(include)` and `${PACKAGE_INCLUDE_DIRS}`. HOT 3
- Exporting dependencies of header-only (interface) libraries to downstream packages HOT 3
- ament_pack_build_configuration is very slow for many dependencies HOT 4
- PRIVATE option to ament_target_dependencies does not work HOT 1
- Add support for gmock in ament_cmake_auto
- Enable compulsory sign-off for ament organization or ament_cmake repo? HOT 3
- Backport `ament_auto_add_gmock` to humble HOT 3
- Fix compiler warnings related to gtest/gmock (backport #408 to humble) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ament_cmake.