From f81d1bdf84967e7926952449777a6ff17082143b Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Thu, 26 Oct 2023 17:00:02 +0200 Subject: [PATCH] Don't enforce C++11 standard The default in Ubuntu 18.04 and 20.04 is C++14. Ubuntu 22.04 uses C++17 as the gcc default, which is required by log4cxx there. --- realsense2_camera/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/realsense2_camera/CMakeLists.txt b/realsense2_camera/CMakeLists.txt index a0a8deba6c..2e516b7e22 100644 --- a/realsense2_camera/CMakeLists.txt +++ b/realsense2_camera/CMakeLists.txt @@ -1,6 +1,5 @@ cmake_minimum_required(VERSION 2.8.3) project(realsense2_camera) -add_compile_options(-std=c++11) option(BUILD_WITH_OPENMP "Use OpenMP" OFF) option(SET_USER_BREAK_AT_STARTUP "Set user wait point in startup (for debug)" OFF) @@ -62,7 +61,7 @@ endif() if (WIN32) else() -set(CMAKE_CXX_FLAGS "-fPIE -fPIC -std=c++11 -D_FORTIFY_SOURCE=2 -fstack-protector -Wformat -Wformat-security -Wall ${CMAKE_CXX_FLAGS}") +set(CMAKE_CXX_FLAGS "-fPIE -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector -Wformat -Wformat-security -Wall ${CMAKE_CXX_FLAGS}") endif() add_message_files(