1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-28 05:57:39 +00:00

Better fix for Boost Asio and string_view issue in macOS

This commit is contained in:
Carles Fernandez
2019-05-26 02:09:53 +02:00
parent d13e00ba50
commit 59494034d8
6 changed files with 76 additions and 25 deletions

View File

@@ -100,12 +100,20 @@ if(Boost_VERSION VERSION_GREATER "106599")
)
endif()
# Fix for Boost Asio < 1.70
if(OS_IS_MACOSX)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_definitions(tracking_libs
PUBLIC
-DBOOST_ASIO_HAS_STD_STRING_VIEW
)
if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (${Boost_VERSION} VERSION_LESS 107000))
if(${has_string_view})
target_compile_definitions(tracking_libs
PUBLIC
-DBOOST_ASIO_HAS_STD_STRING_VIEW=1
)
else()
target_compile_definitions(tracking_libs
PUBLIC
-DBOOST_ASIO_HAS_STD_STRING_VIEW=0
)
endif()
endif()
endif()