CMakeLists.txt
1 set(srcs 2 "unity/src/unity.c" 3 "unity_port_esp32.c") 4 5 if(CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL) 6 list(APPEND COMPONENT_PRIV_INCLUDEDIRS "include/priv") 7 endif() 8 9 if(CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER) 10 list(APPEND srcs "unity_runner.c") 11 endif() 12 13 if(CONFIG_UNITY_ENABLE_FIXTURE) 14 list(APPEND srcs "unity/extras/fixture/src/unity_fixture.c") 15 endif() 16 17 idf_component_register(SRCS "${srcs}" 18 INCLUDE_DIRS "include" "unity/src" "unity/extras/fixture/src") 19 20 target_compile_definitions(${COMPONENT_LIB} PUBLIC 21 -DUNITY_INCLUDE_CONFIG_H 22 ) 23 24 target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-const-variable)