mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(heap/cmake): avoid using BUILD_COMPONENTS build property for IDF_BUILD_V2
IDF_BUILD_V2 does not have BUILD_COMPONENTS build property. Therefore, when IDF_BUILD_V2 is defined, use a generator expressions instead. I believe that the one-liner should also work with IDF_BUILD_V1, but the change is kept separate to clearly show the difference between IDF_BUILD_V1 and IDF_BUILD_V2. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -69,9 +69,13 @@ if(CONFIG_HEAP_TRACING)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
|
||||
idf_build_get_property(build_components BUILD_COMPONENTS)
|
||||
if(freertos IN_LIST build_components)
|
||||
target_compile_options(${COMPONENT_TARGET} PRIVATE "-DMULTI_HEAP_FREERTOS")
|
||||
if(IDF_BUILD_V2)
|
||||
target_compile_options(${COMPONENT_TARGET} PRIVATE "$<$<TARGET_EXISTS:idf::freertos>:-DMULTI_HEAP_FREERTOS>")
|
||||
else()
|
||||
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
|
||||
idf_build_get_property(build_components BUILD_COMPONENTS)
|
||||
if(freertos IN_LIST build_components)
|
||||
target_compile_options(${COMPONENT_TARGET} PRIVATE "-DMULTI_HEAP_FREERTOS")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user