Code: Select all
- project (also $PROJECT_PATH)
- components
- a
- test
CMakeLists.txt
/* other source files */
CMakeLists.txt
/* other source files */
- b
- test
CMakeLists.txt
/* other source files */
CMakeLists.txt
/* other source files */
- c
- test
CMakeLists.txt
/* other source files */
CMakeLists.txt
/* other source files */
- tests
- main
main.c
CMakeLists.txt
CMakeLists.txt <- top-level CMakeLists.txt
Running idf.py build only shows the components that are compiled for the factory firmware, but none of the test components are being listed. By inspecting $IDF_PATH/tools/cmake/project.cmake, I see one of the following conditions must be met in order to add the test components into the list. So I have added the following line on the top-level CMakeLists.txt right before calling project():
Code: Select all
set(BUILD_TESTS 1) # <- Apparently required by project.cmake
project(my_project)
Code: Select all
Failed to resolve component 'test_utils'.
Thanks for reading,
Xavi