Skip to content

Commit

Permalink
[CMake] silence boost python warning on boost bind
Browse files Browse the repository at this point in the history
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:
boostorg/python#296
boostorg/python#315
  • Loading branch information
nim65s committed Jan 28, 2021
1 parent ee8f7b3 commit ea7ee30
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ EXPORT_BOOST_DEFAULT_OPTIONS()
ADD_PROJECT_DEPENDENCY(Boost REQUIRED COMPONENTS ${BOOST_REQUIERED_COMPONENTS})
FIND_PACKAGE(Boost REQUIRED COMPONENTS ${BOOST_BUILD_COMPONENTS})

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()

IF(BUILD_PYTHON_INTERFACE)
FINDPYTHON()
SEARCH_FOR_BOOST_PYTHON(REQUIRED)
Expand Down

0 comments on commit ea7ee30

Please sign in to comment.