Merge branch 'bugfix/treat_unreg_components_as_unresolved' into 'master'

CMake: Treat unregistered components as unresolved

See merge request espressif/esp-idf!5700
This commit is contained in:
Ivan Grokhotkov 2019-10-09 23:53:57 +08:00
commit f8a3da024a

View file

@ -181,7 +181,8 @@ endfunction()
# #
function(__build_resolve_and_add_req var component_target req type) function(__build_resolve_and_add_req var component_target req type)
__component_get_target(_component_target ${req}) __component_get_target(_component_target ${req})
if(NOT _component_target) __component_get_property(_component_registered ${component_target} __COMPONENT_REGISTERED)
if(NOT _component_target OR NOT _component_registered)
message(FATAL_ERROR "Failed to resolve component '${req}'.") message(FATAL_ERROR "Failed to resolve component '${req}'.")
endif() endif()
__component_set_property(${component_target} ${type} ${_component_target} APPEND) __component_set_property(${component_target} ${type} ${_component_target} APPEND)