Fix AppleClang 10.0.1 support with Boost.Asio <= 1.68

This commit is contained in:
Dennis Klein 2019-12-13 12:21:46 +01:00 committed by Dennis Klein
parent 50be386191
commit 4d1e7b9cdb

View File

@ -58,6 +58,12 @@ if(BUILD_FAIRMQ OR BUILD_SDK)
${TOOLS_PUBLIC_HEADER_FILES}
)
target_compile_definitions(${target} PUBLIC BOOST_ERROR_CODE_HEADER_ONLY)
# workaround https://github.com/boostorg/asio/commit/43874d5497414c67655d901e48c939ef01337edb
if( Boost_VERSION VERSION_LESS 1.69
AND CMAKE_CXX_COMPILER_ID STREQUAL AppleClang
AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0.1)
target_compile_definitions(${target} PUBLIC BOOST_ASIO_HAS_STD_STRING_VIEW)
endif()
target_include_directories(${target}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>