Some changes required to get this compiling with esp-idf cmake

This commit is contained in:
2021-02-09 16:59:47 +01:00
parent 28d44160f3
commit 6d43e2bcc4
2 changed files with 31 additions and 9 deletions

View File

@ -1,3 +1,11 @@
if(IDF_TARGET STREQUAL "esp32")
set(RING_BUFFER_NOEXCEPT ON)
set(RING_BUFFER_CONSTEXPR ON)
set(RING_BUFFER_CONSTEXPR_DESTRUCTORS ON)
else()
try_compile(cxx-least-11 ${CMAKE_BINARY_DIR}/detect ${CMAKE_SOURCE_DIR}/detect/cxxstd.cpp
COMPILE_DEFINITIONS -DCXX_STANDARD=201103
CXX_STANDARD ${CMAKE_CXX_STANDARD}
@ -34,3 +42,5 @@ if(constexpr-destructors-compile)
set(RING_BUFFER_CONSTEXPR_DESTRUCTORS ON)
message(STATUS "Enabling RING_BUFFER_CONSTEXPR_DESTRUCTORS (C++20 and up)")
endif()
endif()