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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user