From 87ef1b8679bc1dd128f9ea4f09d8ac75d7be04b1 Mon Sep 17 00:00:00 2001 From: mosfet80 Date: Wed, 15 May 2024 11:37:58 +0200 Subject: [PATCH 1/2] Update CMakeLists.txt minimum active ros2 (humble) require cxx 17 standard and cmake >=3.8. https://docs.ros.org/en/humble/The-ROS2-Project/Contributing/Code-Style-Language-Versions.html --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a4f144..912b730 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,9 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.8) project(srdfdom LANGUAGES CXX) -# Default to C++14 +# Default to C++17 if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD 17) endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") From 338eed51e820b49f7c0edf9d0a69f52926e9a282 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Mon, 9 Sep 2024 11:00:40 +0200 Subject: [PATCH 2/2] Drop enforcement of C++ version. C++17 is the default in Ubuntu Jammy and later. --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 912b730..abb14bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,6 @@ cmake_minimum_required(VERSION 3.8) project(srdfdom LANGUAGES CXX) -# Default to C++17 -if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 17) -endif() - if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif()