Skip to content

Commit 6c3796b

Browse files
committed
fix: build native IDF component as C++17
Signed-off-by: Zhibin (Ryan) Wen <wenzhibin@espressif.com>
1 parent 1e5218a commit 6c3796b

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ idf_component_register(
3030
PRIV_REQUIRES ${private_requires}
3131
)
3232

33+
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17" APPEND)
34+
3335
# Optionally link M5Unified only when it is already part of the build (e.g. a M5Unified-based
3436
# app or example). This puts M5GFX's <utility/I2C_Class.hpp> on adapter_i2c.cpp's include path,
3537
# so the real m5::I2C_Class adapter is compiled instead of the stub. Pure ESP-IDF builds without

src/m5_unit_component/adapter_spi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "adapter_spi.hpp"
1212
#if defined(ESP_PLATFORM)
1313
#include <driver/gpio.h>
14+
#include <freertos/FreeRTOS.h>
1415
#endif
1516
#include <M5HAL.hpp>
1617
#include <M5Utility.hpp>

0 commit comments

Comments
 (0)