mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
feat(cmakev2/project): allow to include all discovered components
If the IDF_INCLUDE_ALL_COMPONENTS variable is set, all discovered components will be included. By default, components are included based on their requirements. When IDF_INCLUDE_ALL_COMPONENTS is enabled, the all_component_info dictionary in the project_description.json file will be fully populated. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -560,6 +560,19 @@ macro(idf_project_init)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# If explicitly requested, include all components by calling
|
||||
# `add_subdirectory` for every discovered component. The default
|
||||
# behavior is to include only the components based on the requirements.
|
||||
__get_default_value(VARIABLE IDF_INCLUDE_ALL_COMPONENTS
|
||||
DEFAULT NO
|
||||
OUTPUT include_all_components)
|
||||
if(include_all_components)
|
||||
idf_msg("Including all discovered components")
|
||||
foreach(component_name IN LISTS component_names)
|
||||
idf_component_include("${component_name}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
idf_build_set_property(__PROJECT_INITIALIZED YES)
|
||||
endif()
|
||||
unset(project_initialized)
|
||||
|
||||
Reference in New Issue
Block a user