mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-19 14:26:01 -04:00
cmake: don't search for toolchain files in component directory
This feature was added when we thought that target components might be added out of IDF tree. That never became possible, and with recent changes in IDF architecture it is unlikely that this feature will be necessary any time soon. Remove it, simplifying the code.
This commit is contained in:
parent
14e600801e
commit
06c0b8a5d0
@ -446,12 +446,6 @@ function run_tests()
|
||||
mv CMakeLists.bak CMakeLists.txt
|
||||
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
|
||||
|
||||
print_status "Can find toolchain file in component directory"
|
||||
clean_build_dir
|
||||
mv ${IDF_PATH}/tools/cmake/toolchain-esp32.cmake ${IDF_PATH}/components/esp32/
|
||||
(idf.py reconfigure > /dev/null && grep "${IDF_PATH}/components/esp32/toolchain-esp32.cmake" build/CMakeCache.txt) || failure "Failed to find toolchain file in component directory"
|
||||
mv ${IDF_PATH}/components/esp32/toolchain-esp32.cmake ${IDF_PATH}/tools/cmake/
|
||||
|
||||
print_status "Setting EXTRA_COMPONENT_DIRS works"
|
||||
clean_build_dir
|
||||
(idf.py reconfigure | grep "$PWD/main") || failure "Failed to verify original `main` directory"
|
||||
|
@ -78,18 +78,6 @@ macro(__target_set_toolchain)
|
||||
if(EXISTS ${toolchain_file_global})
|
||||
set(CMAKE_TOOLCHAIN_FILE ${toolchain_file_global})
|
||||
else()
|
||||
__component_get_target(component_target ${IDF_TARGET})
|
||||
if(NOT component_target)
|
||||
message(FATAL_ERROR "Unable to resolve '${IDF_TARGET}' for setting toolchain file.")
|
||||
endif()
|
||||
get_property(component_dir TARGET ${component_target} PROPERTY COMPONENT_DIR)
|
||||
# Try to load the toolchain file from the directory of IDF_TARGET component
|
||||
set(toolchain_file_component ${component_dir}/toolchain-${IDF_TARGET}.cmake)
|
||||
if(EXISTS ${toolchain_file_component})
|
||||
set(CMAKE_TOOLCHAIN_FILE ${toolchain_file_component})
|
||||
else()
|
||||
message(FATAL_ERROR "Toolchain file toolchain-${IDF_TARGET}.cmake not found,"
|
||||
"checked ${toolchain_file_global} and ${toolchain_file_component}")
|
||||
endif()
|
||||
message(FATAL_ERROR "Toolchain file ${toolchain_file_global} not found")
|
||||
endif()
|
||||
endmacro()
|
||||
|
Loading…
Reference in New Issue
Block a user