Previously the error message was
CMake Error at /home/user/esp-idf/tools/cmake/build.cmake:296 (__component_get_property):
__component_get_property Function invoked with incorrect arguments for
function named: __component_get_property
Call Stack (most recent call first):
/home/user/esp-idf/tools/cmake/build.cmake:341 (__build_resolve_and_add_req)
/home/user/esp-idf/tools/cmake/build.cmake:638 (__build_expand_requirements)
/home/user/esp-idf/tools/cmake/project.cmake:710 (idf_build_process)
CMakeLists.txt:6 (project)
Now it will be:
CMake Error at /home/user/esp-idf/tools/cmake/build.cmake:298 (message):
Failed to resolve component 'whatever' required by component 'main'.
Call Stack (most recent call first):
/home/user/esp-idf/tools/cmake/build.cmake:345 (__build_resolve_and_add_req)
/home/user/esp-idf/tools/cmake/build.cmake:642 (__build_expand_requirements)
/home/user/esp-idf/tools/cmake/project.cmake:710 (idf_build_process)
CMakeLists.txt:6 (project)
Also improved the hint to show the component name in quotes.
Closes https://github.com/espressif/esp-idf/pull/14036
[Frantisek Hrbata: fixed spelling not related to this change so spellcheck succeeds]
[Frantisek Hrbata: modified the error message to be recognized by the existing hint]
[Frantisek Hrbata: added also check in idf_component_set_property and simple tests]
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
There is currently a bug in the __build_resolve_and_add_req function in
tools/cmake/build.cmake where the check for registered component
requirements is incorrectly applied to the component itself rather than
its dependencies. This issue likely originated from a typo, using
component_target instead of _component_target. To prevent further
confusion, _component_target has been renamed to _req_target.
Fixing this revealed multiple incorrect dependencies for the Linux
target, which have now been resolved by explicitly specifying the
dependencies for the Linux target.
Closes https://github.com/espressif/esp-idf/issues/13447
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>