forked from espressif/esp-idf
fix(xtensa/cmake): do not include project_include.cmake if the architecture is not xtensa
In cmakev2, the project_include.cmake files for every component are included. This means that even when working with RISC-V, the project_include.cmake file for Xtensa is still included. Ensure that the architecture is verified, and exit if it is not Xtensa. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
idf_build_get_property(idf_target_arch IDF_TARGET_ARCH)
|
||||
if(NOT "${idf_target_arch}" STREQUAL "xtensa")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Check toolchain is configured properly in cmake
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
# without '--target' option 'clang -dumpmachine' prints default target arch and it might be not Xtensa
|
||||
|
||||
Reference in New Issue
Block a user