Fix building with gcc 10 and Boost 1.72

This commit is contained in:
Carles Fernandez 2020-05-14 22:33:54 +02:00
parent 13ca2b08b8
commit 5943485a38
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 27 additions and 13 deletions

View File

@ -555,19 +555,6 @@ endif()
################################################################################
# Detect availability of std::span
################################################################################
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <span>
int main()
{ std::span<float> s; }"
has_span
)
################################################################################
# Boost - https://www.boost.org
################################################################################
@ -746,6 +733,20 @@ if(Boost_VERSION_STRING VERSION_GREATER 1.70.99)
endif()
endif()
# Disable concepts to address https://github.com/boostorg/asio/issues/312
if((CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.9) OR
(CMAKE_CXX_COMPILER_ID MATCHES Clang))
target_compile_definitions(Boost::headers
INTERFACE
-DBOOST_ASIO_DISABLE_CONCEPTS
)
endif()
# Workaround for https://github.com/boostorg/format/issues/67
if(Boost_VERSION_STRING VERSION_GREATER 1.71)
set(CMAKE_CXX_STANDARD 17)
endif()
# Fix for Boost Asio < 1.70 when using Clang in macOS
if(Boost_VERSION_STRING VERSION_LESS 1.70.0)
# Check if we have std::string_view
@ -760,6 +761,19 @@ endif()
################################################################################
# Detect availability of std::span
################################################################################
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <span>
int main()
{ std::span<float> s; }"
has_span
)
################################################################################
# VOLK - Vector-Optimized Library of Kernels
################################################################################