kopia lustrzana https://github.com/espressif/esp-idf
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!5739pull/4103/head
commit
ebfa74310c
|
@ -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)
|
||||
|
|
Ładowanie…
Reference in New Issue