Skip to content

Commit

Permalink
Disable -Wdeprecated-declarations for Boost on clang > 17
Browse files Browse the repository at this point in the history
It's not clear why, but clang 18 and 19 do not correctly detect that
/usr/include/boost is a system directory, and it emits warnings for
use of deprecated std::unary_function.
  • Loading branch information
hainest committed Apr 9, 2024
1 parent e70b100 commit f9a49b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/tpls/DyninstBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ if(NOT TARGET Dyninst::Boost)
INTERFACE ${Boost_INCLUDE_DIRS})
target_compile_definitions(Dyninst::Boost_headers
INTERFACE BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
if(CMAKE_CXX_COMPILER_ID STREQUAL Clang AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 17)
target_compile_options(Dyninst::Boost_headers INTERFACE -Wno-deprecated-declarations)
endif()
endif()
message(STATUS "Found Boost ${Boost_VERSION}")
message(STATUS "Boost include directories: ${Boost_INCLUDE_DIRS}")
Expand Down

0 comments on commit f9a49b8

Please sign in to comment.