Skip to content

Commit 3ae3456

Browse files
committed
[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: boostorg/python#296 boostorg/python#315
1 parent efc3922 commit 3ae3456

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ ELSE()
189189
TARGET_COMPILE_OPTIONS(${PROJECT_NAME} PRIVATE $<$<CXX_COMPILER_ID:MSVC>:-bigobj>)
190190
ENDIF()
191191

192+
IF(Boost_VERSION GREATER 107299)
193+
# Silence a warning about a deprecated use of boost bind by boost python
194+
# at least fo boost 1.73 to 1.75
195+
ADD_DEFINITIONS(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
196+
ENDIF()
197+
192198
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME} PUBLIC)
193199
INSTALL(TARGETS ${PROJECT_NAME}
194200
EXPORT ${TARGETS_EXPORT_NAME}

0 commit comments

Comments
 (0)