2019-04-28 03:38:23 -04:00
|
|
|
set(srcs "unity/src/unity.c"
|
|
|
|
"unity_port_esp32.c")
|
2018-10-25 00:52:32 -04:00
|
|
|
|
2018-11-29 04:06:21 -05:00
|
|
|
if(CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL)
|
|
|
|
list(APPEND COMPONENT_PRIV_INCLUDEDIRS "include/priv")
|
|
|
|
endif()
|
|
|
|
|
2018-10-25 00:52:32 -04:00
|
|
|
if(CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER)
|
2019-04-28 03:38:23 -04:00
|
|
|
list(APPEND srcs "unity_runner.c")
|
2018-10-25 00:52:32 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_UNITY_ENABLE_FIXTURE)
|
2019-04-28 03:38:23 -04:00
|
|
|
list(APPEND srcs "unity/extras/fixture/src/unity_fixture.c")
|
2018-10-25 00:52:32 -04:00
|
|
|
endif()
|
|
|
|
|
2019-04-28 03:38:23 -04:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
INCLUDE_DIRS "include" "unity/src")
|
2018-10-25 00:52:32 -04:00
|
|
|
|
2019-05-09 22:53:08 -04:00
|
|
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC
|
2018-10-25 00:52:32 -04:00
|
|
|
-DUNITY_INCLUDE_CONFIG_H
|
|
|
|
)
|
|
|
|
|
|
|
|
if(GCC_NOT_5_2_0)
|
2019-05-09 22:53:08 -04:00
|
|
|
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-const-variable)
|
2018-10-25 00:52:32 -04:00
|
|
|
endif()
|