error out if C++11 is not supported

This commit is contained in:
Ferdinand Bachmann
2020-04-18 16:03:37 +02:00
parent 34260c53cb
commit acaafaaf90

View File

@ -4,6 +4,10 @@ try_compile(cxx-least-11 ${CMAKE_BINARY_DIR}/detect ${CMAKE_SOURCE_DIR}/detect/c
CXX_STANDARD_REQUIRED ${CMAKE_CXX_STANDARD_REQUIRED}
CXX_EXTENSIONS ${CMAKE_CXX_EXTENSIONS}
)
if(NOT cxx-least-11)
message(FATAL_ERROR "This library requires at least C++11")
endif()
if(cxx-least-11)
set(RING_BUFFER_NOEXCEPT ON)
message(STATUS "Enabling RING_BUFFER_NOEXCEPT (C++11 and up)")