Anyone successfully used the COMPONENTS variable to trim down the number of included components in a project, as
per the docs?
Starting with the hello_world example (latest master as of today), changing the top-level CMakeLists.txt to this
Code: Select all
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(COMPONENTS cxx)
project(hello-world)
results in this:
CMake Error at /home/permal/esp/esp-idf/components/partition_table/CMakeLists.txt:61 (add_dependencies):
Cannot add target-level dependencies to non-existent target "bootloader".
The add_dependencies works for top-level logical targets created by the
add_executable, add_library, or add_custom_target commands. If you want to
add file-level dependencies see the DEPENDS option of the add_custom_target
and add_custom_command commands.
CMake Error at /home/permal/esp/esp-idf/components/partition_table/CMakeLists.txt:62 (add_dependencies):
Cannot add target-level dependencies to non-existent target "app".
The add_dependencies works for top-level logical targets created by the
add_executable, add_library, or add_custom_target commands. If you want to
add file-level dependencies see the DEPENDS option of the add_custom_target
and add_custom_command commands.
Ok, so I add the bootloader component:
but that still leaves me with this:
CMake Error at /home/permal/esp/esp-idf/components/partition_table/CMakeLists.txt:62 (add_dependencies):
Cannot add target-level dependencies to non-existent target "app".
The add_dependencies works for top-level logical targets created by the
add_executable, add_library, or add_custom_target commands. If you want to
add file-level dependencies see the DEPENDS option of the add_custom_target
and add_custom_command commands.
Am I using this wrong? It seems the minim one must include is this, anything less and it breaks.
Code: Select all
set(COMPONENTS bootloader esptool_py )
The reason I'm even trying to reduce the number of components is because of all the different target generated by CMake. In CLion, these are all listed in the project window and debug/run targets, and it gets quite long; this is only about half of them. Having to navigate them all is a bit of a pain since I have no actual interest in them other than as libraries. Even with the minimum set of components, the list is nearly as long as in the image. The poor hello_world gets lost among them all.

- Screenshot from 2018-10-09 22-06-48.png (115.45 KiB) Viewed 9838 times