CMakeLists.txt 969 B

12345678910111213141516171819202122232425
  1. # This is the project CMakeLists.txt file for the test subproject
  2. cmake_minimum_required(VERSION 3.16)
  3. # "Trim" the build. Include the minimal set of components, main, and anything it depends on.
  4. set(COMPONENTS main)
  5. set(EXTRA_COMPONENT_DIRS
  6. "$ENV{IDF_PATH}/tools/unit-test-app/components"
  7. )
  8. include($ENV{IDF_PATH}/tools/cmake/project.cmake)
  9. project(i2c_test)
  10. if(CONFIG_COMPILER_DUMP_RTL_FILES)
  11. add_custom_target(check_test_app_sections ALL
  12. COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
  13. --rtl-dirs ${CMAKE_BINARY_DIR}/esp-idf/driver/,${CMAKE_BINARY_DIR}/esp-idf/hal/
  14. --elf-file ${CMAKE_BINARY_DIR}/i2c_test.elf
  15. find-refs
  16. --from-sections=.iram0.text
  17. --to-sections=.flash.text,.flash.rodata
  18. --exit-code
  19. DEPENDS ${elf}
  20. )
  21. endif()