Skip to content

Commit

Permalink
Update compile definitions for newer boost versions
Browse files Browse the repository at this point in the history
  • Loading branch information
arahlin committed Aug 20, 2024
1 parent 0c8a568 commit 4bd3275
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,14 @@ target_link_libraries(spt3g INTERFACE pthread ${Boost_LIBRARIES} ${Python_LIBRAR

# Work around yet more bugs in GCC 4.4, this time with C++ 11 support
# Also increase maximum number of arguments in python bindings
target_compile_definitions(spt3g INTERFACE -DBOOST_NO_CXX11_SMART_PTR=1
-DBOOST_PYTHON_MAX_ARITY=20 -DBOOST_BIND_GLOBAL_PLACEHOLDERS
-DBOOST_ALLOW_DEPRECATED_HEADERS)
target_compile_definitions(spt3g INTERFACE -DBOOST_PYTHON_MAX_ARITY=20
-DBOOST_ALLOW_DEPRECATED_HEADERS)
if(Boost_VERSION VERSION_LESS 1.77)
target_compile_definitions(spt3g INTERFACE -DBOOST_BIND_GLOBAL_PLACEHOLDERS)
endif()
if(Boost_VERSION VERSION_LESS 1.82)
target_compile_definitions(spt3g INTERFACE -DBOOST_NO_CXX11_SMART_PTR=1)
endif()

# Shell script to set environment variables
configure_file(${CMAKE_SOURCE_DIR}/cmake/env-shell.sh.in ${CMAKE_BINARY_DIR}/env-shell.sh @ONLY)
Expand Down

0 comments on commit 4bd3275

Please sign in to comment.