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

Update rmw_implementation to C++17. #214

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

clalancette
Copy link
Contributor

The two reasons to do this are:

  1. So that we can compile rmw_implementation with the clang static analyzer. As of clang++-14 (what is in Ubuntu 22.04), the default still seems to be C++14, so we need to specify C++17 so that new things in the rclcpp headers work properly.
  2. So we can build with a newer version of gtest which requires this.

Further, due to reasons I don't fully understand, I needed to set CMAKE_CXX_STANDARD_REQUIRED in order for clang to really use that version. So set this as well.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

The two reasons to do this are:

1. So that we can compile rmw_implementation
   with the clang static analyzer. As of clang++-14
   (what is in Ubuntu 22.04), the default still seems
   to be C++14, so we need to specify C++17 so that new
   things in the rclcpp headers work properly.
2. So we can build with a newer version of gtest which requires this.

Further, due to reasons I don't fully understand, I needed to
set CMAKE_CXX_STANDARD_REQUIRED in order for clang to really use
that version. So set this as well.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

quick question, are you going to apply the same change to other projects for clang static analyzer? why there 2 projects are picked up?

@clalancette
Copy link
Contributor Author

quick question, are you going to apply the same change to other projects for clang static analyzer?

Yeah, I have a whole series of these queued up. See for example ros2/rosidl_typesupport#131 , ros2/rosidl_typesupport_fastrtps#94 , etc (and there are more that I haven't even opened yet).

why there 2 projects are picked up?

Sorry, I don't quite understand this question. Can you rephrase?

@fujitatomoya
Copy link
Collaborator

Sorry, I don't quite understand this question. Can you rephrase?

I just saw the two PRs, so that I came up with that question.

Yeah, I have a whole series of these queued up. See for example ros2/rosidl_typesupport#131 , ros2/rosidl_typesupport_fastrtps#94 , etc (and there are more that I haven't even opened yet).

this answers my question too! thanks.

@clalancette
Copy link
Contributor Author

this answers my question too! thanks.

You are welcome!

CI for this is in ros2/rosidl_typesupport#131 (comment), and since that is green and this is approved, I'm going to merge it in.

@clalancette clalancette merged commit 5ca69c3 into rolling Jan 30, 2023
@delete-merged-branch delete-merged-branch bot deleted the clalancette/update-to-c++17 branch January 30, 2023 20:27
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.

None yet

2 participants