mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
Merge branch 'bugfix/cmakev2-coredump-default-component_v6.1' into 'release/v6.1'
fix(cmakev2): include config-selected default components (v6.1) See merge request espressif/esp-idf!51930
This commit is contained in:
@@ -582,6 +582,12 @@ endfunction()
|
||||
component is already included, the idf_component_include function
|
||||
simply returns, as there is nothing further to do except add a new
|
||||
alias target if requested.
|
||||
|
||||
PROJECT_DEFAULT_EXTRA_COMPONENTS
|
||||
Internal list of additional components to include in the executable
|
||||
created by idf_project_default. Components should use
|
||||
idf_project_add_default_build_component rather than modifying this
|
||||
property directly.
|
||||
#]]
|
||||
add_library(idf_build_properties INTERFACE)
|
||||
|
||||
|
||||
@@ -730,6 +730,28 @@ function(idf_build_generate_flasher_args)
|
||||
INPUT "${build_dir}/flasher_args.json.in")
|
||||
endfunction()
|
||||
|
||||
#[[api
|
||||
.. cmakev2:function:: idf_project_add_default_build_component
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
idf_project_add_default_build_component(<component>...)
|
||||
|
||||
*component[in]*
|
||||
|
||||
Component name to include in the executable created by
|
||||
:cmakev2:ref:`idf_project_default`.
|
||||
|
||||
Add components to the default project executable. This is intended for
|
||||
components that need to be built based on sdkconfig alone, for example to
|
||||
provide linker-section registrations, without making another component
|
||||
depend on them. This is e.g. the case with coredump which is simply enabled
|
||||
based on CONFIG_ESP_COREDUMP_ENABLE option, but no other components depend it.
|
||||
#]]
|
||||
function(idf_project_add_default_build_component)
|
||||
idf_build_set_property(PROJECT_DEFAULT_EXTRA_COMPONENTS "${ARGN}" APPEND)
|
||||
endfunction()
|
||||
|
||||
#[[
|
||||
.. cmakev2:macro:: __project_default
|
||||
|
||||
@@ -751,6 +773,11 @@ function(__project_default)
|
||||
set(root_components ${shim_components})
|
||||
else()
|
||||
set(root_components main)
|
||||
idf_build_get_property(extra_default_components PROJECT_DEFAULT_EXTRA_COMPONENTS)
|
||||
if(extra_default_components)
|
||||
list(APPEND root_components ${extra_default_components})
|
||||
list(REMOVE_DUPLICATES root_components)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
idf_build_executable("${executable}"
|
||||
|
||||
Reference in New Issue
Block a user