From 78ac1317c9d0489f9f1bd9c68193d4e23be4604f Mon Sep 17 00:00:00 2001 From: Guilhem Saurel <guilhem.saurel@laas.fr> Date: Wed, 2 Sep 2020 21:17:19 +0200 Subject: [PATCH] [CMake] gazebo 11 requires C++17 --- CMakeLists.txt | 6 +++++- cmake | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8e49b9..a2e31ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,6 @@ OPTION(SUFFIX_SO_VERSION "Suffix library name with its version" ON) # Project configuration SET(PROJECT_USE_CMAKE_EXPORT TRUE) SET(CXX_DISABLE_WERROR TRUE) -SET(CMAKE_CXX_STANDARD 11) # JRL-cmakemodule setup INCLUDE(cmake/base.cmake) @@ -20,6 +19,7 @@ INCLUDE(cmake/base.cmake) # Project definition COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX C) PROJECT(${PROJECT_NAME} ${PROJECT_ARGS}) +CHECK_MINIMAL_CXX_STANDARD(11 ENFORCE) # Project dependencies ADD_PROJECT_DEPENDENCY(urdfdom REQUIRED) @@ -27,6 +27,10 @@ ADD_PROJECT_DEPENDENCY(gazebo REQUIRED) ADD_PROJECT_DEPENDENCY(roscpp) find_package(catkin REQUIRED COMPONENTS roscpp) +if(${gazebo_VERSION} VERSION_GREATER_EQUAL 11) + CHECK_MINIMAL_CXX_STANDARD(17 ENFORCE) +endif() + # Main Library SET(${PROJECT_NAME}_HEADERS ) diff --git a/cmake b/cmake index 72cf8cd..be9051c 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 72cf8cdefcf8cde818745ad7998122bde0b54734 +Subproject commit be9051ce90147cde6cc77cea0dcbe12895756fd1 -- GitLab