Skip to content

Commit

Permalink
Work around boost failure to build in clang 15
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrey4444 committed Sep 25, 2023
1 parent a693a86 commit 39b93eb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmake/SetupBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,13 @@ set_property(TARGET Boost::boost
APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS
$<$<COMPILE_LANGUAGE:CXX>:${BOOST_MULTI_ARRAY_TYPES_HEADER_GUARD}>)

# Work around boost not building with clang 15
# (https://github.com/boostorg/functional/pull/21)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "15.0.0" OR
CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "15.0.0")
target_compile_definitions(Boost::boost INTERFACE _HAS_AUTO_PTR_ETC=0)
endif()
endif()

0 comments on commit 39b93eb

Please sign in to comment.