From 87e2db88132e15c39ceba13472458023be2970fd Mon Sep 17 00:00:00 2001 From: Ruixiang Du Date: Thu, 5 Mar 2020 21:12:40 +0800 Subject: [PATCH] fixed asio warning, enabled C++11 in scout_webots_sim package --- scout_sdk/include/scout_sdk/async_io/async_can.hpp | 7 ++++++- scout_sdk/include/scout_sdk/async_io/async_serial.hpp | 7 ++++++- scout_webots_sim/CMakeLists.txt | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/scout_sdk/include/scout_sdk/async_io/async_can.hpp b/scout_sdk/include/scout_sdk/async_io/async_can.hpp index ca12a76..6a6de15 100644 --- a/scout_sdk/include/scout_sdk/async_io/async_can.hpp +++ b/scout_sdk/include/scout_sdk/async_io/async_can.hpp @@ -36,8 +36,13 @@ #include #include -#define ASIO_ENABLE_OLD_SERVICES +#ifndef ASIO_ENABLE_OLD_SERVICES +#define ASIO_ENABLE_OLD_SERVICES +#endif + +#ifndef ASIO_HAS_POSIX_STREAM_DESCRIPTOR #define ASIO_HAS_POSIX_STREAM_DESCRIPTOR +#endif #include "asio.hpp" #include "asio/posix/basic_stream_descriptor.hpp" diff --git a/scout_sdk/include/scout_sdk/async_io/async_serial.hpp b/scout_sdk/include/scout_sdk/async_io/async_serial.hpp index e4993fa..3433bb7 100644 --- a/scout_sdk/include/scout_sdk/async_io/async_serial.hpp +++ b/scout_sdk/include/scout_sdk/async_io/async_serial.hpp @@ -38,8 +38,13 @@ #include #include -#define ASIO_ENABLE_OLD_SERVICES +#ifndef ASIO_ENABLE_OLD_SERVICES +#define ASIO_ENABLE_OLD_SERVICES +#endif + +#ifndef ASIO_HAS_POSIX_STREAM_DESCRIPTOR #define ASIO_HAS_POSIX_STREAM_DESCRIPTOR +#endif #include "asio.hpp" diff --git a/scout_webots_sim/CMakeLists.txt b/scout_webots_sim/CMakeLists.txt index 0e91504..5fce193 100644 --- a/scout_webots_sim/CMakeLists.txt +++ b/scout_webots_sim/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3) project(scout_webots_sim) ## Compile as C++11, supported in ROS Kinetic and newer -# add_compile_options(-std=c++11) +add_compile_options(-std=c++11) ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)