From 3d6ca2e412a6caf90ca1d567ca3416f6bf4f6e92 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Fri, 12 Mar 2021 21:17:55 +0100 Subject: [PATCH] [CMake] workaround boost bind warnings --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef95865..7793cfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,12 @@ IF(BUILD_PYTHON_INTERFACE) STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME}) ADD_PROJECT_DEPENDENCY(dynamic-graph-python 4.0.0 REQUIRED) SET(CATKIN_REQUIRED_COMPONENTS ${CATKIN_REQUIRED_COMPONENTS} rospy) + + IF(Boost_VERSION GREATER 107299 OR Boost_VERSION_MACRO GREATER 107299) + # Silence a warning about a deprecated use of boost bind by boost >= 1.73 + # without dropping support for boost < 1.73 + ADD_DEFINITIONS(-DBOOST_BIND_GLOBAL_PLACEHOLDERS) + ENDIF() ENDIF(BUILD_PYTHON_INTERFACE) find_package(catkin REQUIRED COMPONENTS ${CATKIN_REQUIRED_COMPONENTS})