mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-29 18:27:20 +02:00
Merge branch 'bugfix/link_test_components_to_executable_directly' into 'release/v3.3'
cmake: link test components to executable directly See merge request espressif/esp-idf!5739
This commit is contained in:
@ -108,8 +108,11 @@ function(register_component)
|
||||
endforeach()
|
||||
|
||||
if(${COMPONENT_NAME} IN_LIST BUILD_TEST_COMPONENTS)
|
||||
target_link_libraries(${COMPONENT_TARGET} "-L${CMAKE_CURRENT_BINARY_DIR}")
|
||||
target_link_libraries(${COMPONENT_TARGET} "-Wl,--whole-archive -l${COMPONENT_NAME} -Wl,--no-whole-archive")
|
||||
set_property(TARGET ${IDF_PROJECT_EXECUTABLE} APPEND PROPERTY
|
||||
LINK_LIBRARIES "-L${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
set_property(TARGET ${IDF_PROJECT_EXECUTABLE} APPEND PROPERTY
|
||||
LINK_LIBRARIES "-Wl,--whole-archive -l${COMPONENT_NAME} -Wl,--no-whole-archive")
|
||||
endif()
|
||||
|
||||
if(COMPONENT_SRCS OR embed_binaries)
|
||||
|
Reference in New Issue
Block a user