mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
soc: fix compiling unit tests with CMake
soc unit tests have not been included when compiling with CMake, because ../${SOC_NAME}/test was not evaluated relative to the CMakeLists.txt directory. Also call register_components() regardless of the presence of test directory for particular target.
This commit is contained in:
parent
96aa08a0ff
commit
73851e0b5c
@ -1,9 +1,10 @@
|
|||||||
set(SOC_NAME ${IDF_TARGET})
|
set(SOC_NAME ${IDF_TARGET})
|
||||||
if(EXISTS "../${SOC_NAME}/test")
|
set(SOC_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../${SOC_NAME}/test)
|
||||||
set(COMPONENT_SRCDIRS "../${SOC_NAME}/test")
|
if(EXISTS "${SOC_TEST_DIR}")
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS "../${SOC_NAME}/test")
|
set(COMPONENT_SRCDIRS "${SOC_TEST_DIR}")
|
||||||
|
set(COMPONENT_ADD_INCLUDEDIRS "${SOC_TEST_DIR}")
|
||||||
set(COMPONENT_REQUIRES unity test_utils)
|
|
||||||
|
|
||||||
register_component()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(COMPONENT_REQUIRES unity test_utils)
|
||||||
|
|
||||||
|
register_component()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user