Skip to content
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

use target_include_directories #54

Merged

Conversation

Karsten1987
Copy link

fixes #53

please also consider this for a backport to eloquent.

Signed-off-by: Karsten Knese [email protected]

Signed-off-by: Karsten Knese <[email protected]>
@Karsten1987
Copy link
Author

for what it's worth: I am not part of the org unit and can't assign myself to this issue/PR

@Karsten1987
Copy link
Author

Karsten1987 commented Feb 3, 2020

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status
  • Windows-container Build Status

@Karsten1987
Copy link
Author

@wjwwood just a friendly ping as you're listed as the maintainer. Not sure if you're watching this repo.

@wjwwood
Copy link
Member

wjwwood commented Feb 4, 2020

@jonbinney is helping, but maybe never added himself to the package.xml.

@jonbinney
Copy link
Contributor

I thought I was safe if I wasn't in the package xml! :-P

I'll review this today.

@wjwwood
Copy link
Member

wjwwood commented Feb 4, 2020

Not so long as I'm around :p

But seriously, @jonbinney feel free ask me for help if you don't have time.

@Karsten1987
Copy link
Author

@jonbinney I hope the change is trivial enough that it doesn't take much to review it.

It's essentially really just avoiding a global include_directories CMake instructions which has implications to other projects when built in non-isolation. The change only attaches the includes to the actual CMake target.

${Eigen3_INCLUDE_DIRS}
)
ament_target_dependencies(laser_geometry
"rclcpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Karsten1987 do these need to be quoted?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess they don’t have to be quoted since every variable is interpreted as a string (I might be wrong here)
But we do that in other parts of the ROS2 code base as well, e.g. in rclcpp: https://github.com/ros2/rclcpp/blob/master/rclcpp/CMakeLists.txt#L112

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair, and I'll go ahead and merge this. I do think that quoting some things but not others (for example the arguments to find_package listed earlier in the file) might confuse people. In general I prefer only adding required characters, so that people don't wonder what they really need and what is optional.

@jonbinney
Copy link
Contributor

Yeah, i mainly wanted to build it myself as a sanity check. It does build for me, and tests pass (yay!). I've left one comment with a question, once that is answered I'll merge.

@jonbinney jonbinney merged commit 8aa0766 into ros-perception:ros2 Feb 5, 2020
@Karsten1987 Karsten1987 deleted the target_include_directories branch February 5, 2020 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants