Merge branch 'bugfix/convert_to_cmake' into 'master'
Fix minor issue with convert_to_cmake script See merge request idf/esp-idf!3666
This commit is contained in:
commit
554cf77963
|
@ -30,7 +30,7 @@ if(CONFIG_HEAP_TRACING)
|
||||||
heap_caps_realloc_default)
|
heap_caps_realloc_default)
|
||||||
|
|
||||||
foreach(wrap ${WRAP_FUNCTIONS})
|
foreach(wrap ${WRAP_FUNCTIONS})
|
||||||
target_link_libraries(heap "-Wl,--wrap=${wrap}")
|
target_link_libraries(${COMPONENT_TARGET} "-Wl,--wrap=${wrap}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -21,6 +21,11 @@ include_directories("${COMPONENT_PATH}/port/include")
|
||||||
# Import mbedtls library targets
|
# Import mbedtls library targets
|
||||||
add_subdirectory(mbedtls)
|
add_subdirectory(mbedtls)
|
||||||
|
|
||||||
|
# Use port specific implementation of net_socket.c instead of one from mbedtls
|
||||||
|
get_target_property(src_tls mbedtls SOURCES)
|
||||||
|
list(REMOVE_ITEM src_tls net_sockets.c)
|
||||||
|
set_property(TARGET mbedtls PROPERTY SOURCES ${src_tls})
|
||||||
|
|
||||||
set(mbedtls_targets mbedtls mbedcrypto mbedx509)
|
set(mbedtls_targets mbedtls mbedcrypto mbedx509)
|
||||||
|
|
||||||
# Add port files to mbedtls targets
|
# Add port files to mbedtls targets
|
||||||
|
@ -54,4 +59,4 @@ target_link_libraries(${COMPONENT_TARGET} ${mbedtls_targets})
|
||||||
# Catch usage of deprecated mbedTLS functions when building tests
|
# Catch usage of deprecated mbedTLS functions when building tests
|
||||||
if(mbedtls_test IN_LIST BUILD_TEST_COMPONENTS)
|
if(mbedtls_test IN_LIST BUILD_TEST_COMPONENTS)
|
||||||
add_definitions(-DMBEDTLS_DEPRECATED_WARNING)
|
add_definitions(-DMBEDTLS_DEPRECATED_WARNING)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -6,5 +6,5 @@ set(COMPONENT_REQUIRES)
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
if(CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK)
|
if(CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK)
|
||||||
target_link_libraries(pthread "-Wl,--wrap=vPortCleanUpTCB")
|
target_link_libraries(${COMPONENT_TARGET} "-Wl,--wrap=vPortCleanUpTCB")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -258,6 +258,14 @@ function run_tests()
|
||||||
mv ${IDF_PATH}/components/esp32/toolchain-esp32.cmake ${IDF_PATH}/tools/cmake/
|
mv ${IDF_PATH}/components/esp32/toolchain-esp32.cmake ${IDF_PATH}/tools/cmake/
|
||||||
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
|
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
|
||||||
|
|
||||||
|
print_status "Can build with auto generated CMakeLists.txt"
|
||||||
|
clean_build_dir
|
||||||
|
mv CMakeLists.txt CMakeLists.bak
|
||||||
|
${IDF_PATH}/tools/cmake/convert_to_cmake.py .
|
||||||
|
idf.py build || failure "Auto generated CMakeLists.txt build failed"
|
||||||
|
mv CMakeLists.bak CMakeLists.txt
|
||||||
|
assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
|
||||||
|
|
||||||
print_status "All tests completed"
|
print_status "All tests completed"
|
||||||
if [ -n "${FAILURES}" ]; then
|
if [ -n "${FAILURES}" ]; then
|
||||||
echo "Some failures were detected:"
|
echo "Some failures were detected:"
|
||||||
|
|
Loading…
Reference in a new issue