From 32e6a50b05ccd7a1817fdf92cb15df5a9fcccbbb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 15 May 2020 22:04:32 +0200 Subject: [PATCH] Re-enable concepts for Boost Asio in version 1.73 --- CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cf8fe67d..c0c70448f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -734,13 +734,15 @@ 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 - ) +if(Boost_VERSION_STRING VERSION_LESS 1.73) + # 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() endif() # Workaround for https://github.com/boostorg/format/issues/67