build: Add feature flag FAIRMQ_HAS_STD_PMR

Currently Clang (libc++) does not implement <memory_resource>.
This commit is contained in:
Dennis Klein
2022-08-19 13:04:45 +02:00
committed by Alexey Rybalchenko
parent 904037d9be
commit 6eb973235a
2 changed files with 13 additions and 1 deletions

View File

@@ -174,3 +174,12 @@ if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
else()
set(FAIRMQ_HAS_STD_FILESYSTEM 1)
endif()
if(NOT DEFINED FAIRMQ_HAS_STD_PMR)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Clang (to be more precise: libc++) currently does not implement <memory_resource>
set(FAIRMQ_HAS_STD_PMR 0)
else()
set(FAIRMQ_HAS_STD_PMR 1)
endif()
endif()