CMakeLists.txt 681 B

123456789101112131415161718192021222324252627
  1. set(COMPONENT_SRCS "unity/src/unity.c"
  2. "unity_port_esp32.c")
  3. set(COMPONENT_ADD_INCLUDEDIRS "include"
  4. "unity/src")
  5. if(CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL)
  6. list(APPEND COMPONENT_PRIV_INCLUDEDIRS "include/priv")
  7. endif()
  8. if(CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER)
  9. list(APPEND COMPONENT_SRCS "unity_runner.c")
  10. endif()
  11. if(CONFIG_UNITY_ENABLE_FIXTURE)
  12. list(APPEND COMPONENT_SRCS "unity/extras/fixture/src/unity_fixture.c")
  13. endif()
  14. register_component()
  15. target_compile_definitions(${COMPONENT_TARGET} PUBLIC
  16. -DUNITY_INCLUDE_CONFIG_H
  17. )
  18. if(GCC_NOT_5_2_0)
  19. component_compile_options(-Wno-unused-const-variable)
  20. endif()