Update laser_geometry to C++17. (#90)

The main reason to do this is so that we can compile laser_geometry
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.

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>
This commit is contained in:
Chris Lalancette 2023-01-31 14:37:40 -05:00 committed by GitHub
parent 9247fd1908
commit e95ea15102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.5)
project(laser_geometry) project(laser_geometry)
if(NOT CMAKE_CXX_STANDARD) if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif() endif()
find_package(ament_cmake REQUIRED) find_package(ament_cmake REQUIRED)