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 libstatistics_collector to C++17. #154

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

clalancette
Copy link
Contributor

@clalancette clalancette commented Jan 27, 2023

The two reasons to do this are:

  1. So that we can compile libstatistics_collector 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

@clalancette clalancette requested a review from a team as a code owner January 27, 2023 15:39
@clalancette clalancette requested review from christophebedard and MichaelOrlov and removed request for a team January 27, 2023 15:39
Copy link
Member

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

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

LGTM!

@MichaelOrlov
Copy link
Member

MichaelOrlov commented Jan 27, 2023

@clalancette Curious about why PR title is Update libyaml_vendor to C++17 ?
Shouldn't it be Update libstatistics_collector to C++17 ?

@clalancette
Copy link
Contributor Author

Shouldn't it be Update libstatistics_collector to C++17 ?

Yep! That was a copy-n-paste error on my part, will fix.

@clalancette clalancette changed the title Update libyaml_vendor to C++17. Update libstatistics_collector to C++17. Jan 27, 2023
The two reasons to do this are:

1. So that we can compile libstatistics_collector
   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>
@clalancette
Copy link
Contributor Author

CI for this is in ros2/rosidl_typesupport#131 (comment) . It is all green, so going ahead and merging.

@clalancette clalancette merged commit 21be796 into rolling Jan 30, 2023
@clalancette clalancette deleted the clalancette/update-to-c++17 branch January 30, 2023 13:55
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