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:
commit
ebfa74310c
1 changed files with 5 additions and 2 deletions
|
@ -108,8 +108,11 @@ function(register_component)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(${COMPONENT_NAME} IN_LIST BUILD_TEST_COMPONENTS)
|
if(${COMPONENT_NAME} IN_LIST BUILD_TEST_COMPONENTS)
|
||||||
target_link_libraries(${COMPONENT_TARGET} "-L${CMAKE_CURRENT_BINARY_DIR}")
|
set_property(TARGET ${IDF_PROJECT_EXECUTABLE} APPEND PROPERTY
|
||||||
target_link_libraries(${COMPONENT_TARGET} "-Wl,--whole-archive -l${COMPONENT_NAME} -Wl,--no-whole-archive")
|
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()
|
endif()
|
||||||
|
|
||||||
if(COMPONENT_SRCS OR embed_binaries)
|
if(COMPONENT_SRCS OR embed_binaries)
|
||||||
|
|
Loading…
Reference in a new issue