fix(cmakev2/project): add ESP_PLATFORM to compile_definitions

Set the ESP_PLATFORM macro to indicate to component sources that they
are being compiled with ESP-IDF.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2025-08-21 09:26:17 +02:00
parent 728b7c1f78
commit f43f646ceb

View File

@@ -93,6 +93,7 @@ function(__init_project_configuration)
"_GLIBCXX_HAVE_POSIX_SEMAPHORE" # posix-semaphores from components/pthread
"_GNU_SOURCE")
list(APPEND compile_definitions "ESP_PLATFORM")
list(APPEND compile_definitions "IDF_VER=\"${idf_ver}\"")
list(APPEND compile_options "-ffunction-sections"