From 44a610cbf09f4639b4d47e600897c2f600eec0df Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Thu, 5 Mar 2026 17:24:13 +0100 Subject: [PATCH] feat(cmakev2/compat): allow to set commonly required components The commonly required components are configured solely for backward compatibility with cmakev1. Since the bootloader build explicitly sets commonly required components, we need to support this feature in cmakev2 as well. Ideally, there should be no commonly required components, and each component should specify its requirements explicitly. Signed-off-by: Frantisek Hrbata --- tools/cmakev2/compat.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/cmakev2/compat.cmake b/tools/cmakev2/compat.cmake index 70fe67b3ea..8c6da91ade 100644 --- a/tools/cmakev2/compat.cmake +++ b/tools/cmakev2/compat.cmake @@ -419,10 +419,14 @@ function(__init_common_components) idf_build_get_property(idf_target IDF_TARGET) idf_build_get_property(idf_target_arch IDF_TARGET_ARCH) + idf_build_get_property(explicit_requires_common __COMPONENT_REQUIRES_COMMON) # Define common components that are included as dependencies for each # component. - if("${idf_target}" STREQUAL "linux") + if(explicit_requires_common) + set(requires_common "${explicit_requires_common}") + + elseif("${idf_target}" STREQUAL "linux") set(requires_common freertos esp_hw_support heap log soc hal esp_rom esp_common esp_system linux esp_stdio) else()