From 3ae345655d647299cc93d087b9a8ed62f803331d Mon Sep 17 00:00:00 2001 From: Guilhem Saurel <guilhem.saurel@laas.fr> Date: Mon, 14 Dec 2020 12:01:11 +0100 Subject: [PATCH] [CMake] silence boost python warning on boost bind Boost 1.73 added a boring warning about deprecated use of boost bind, which is still used by boost python. As of Boost 1.75, this is still not fixed: https://github.com/boostorg/python/pull/296 https://github.com/boostorg/python/pull/315 --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49d30b8..762bc03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,6 +189,12 @@ ELSE() TARGET_COMPILE_OPTIONS(${PROJECT_NAME} PRIVATE $<$<CXX_COMPILER_ID:MSVC>:-bigobj>) ENDIF() +IF(Boost_VERSION GREATER 107299) + # Silence a warning about a deprecated use of boost bind by boost python + # at least fo boost 1.73 to 1.75 + ADD_DEFINITIONS(-DBOOST_BIND_GLOBAL_PLACEHOLDERS) +ENDIF() + TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME} PUBLIC) INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} -- GitLab