koide3 / hdl_localization

Real-time 3D localization using a (velodyne) 3D LIDAR
BSD 2-Clause "Simplified" License
775 stars 309 forks source link

Modify CMakeLists.txt to use C++ 17 in ROS Noetic, and C++ 11 in ROS Melodic #53

Closed robustify closed 3 years ago

robustify commented 3 years ago

Using the ROS_DISTRO environment variable, this PR causes catkin to build with C++ 17 in ROS Noetic and maintains C++ 11 in ROS Melodic and earlier. Would you prefer just using C++ 14 in all cases like you did in hdl_graph_slam? https://github.com/koide3/hdl_graph_slam/pull/148

koide3 commented 3 years ago

I used C++14 for back compatibility in hdl_graph_slam, but your way is much smarter. I think I'll update hdl_graph_slam in the same way :+1: