CMakeLists.txt 619 B

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