fix(cmake): disable MINIMAL_BUILD build property if COMPONENTS is defined

The MINIMAL_BUILD build property and the COMPONENTS variable are both
used to determine the initial component list for the build.

Currently, if the COMPONENTS variable is set, the MINIMAL_BUILD logic
is ignored during component selection, but the MINIMAL_BUILD build
property remains set. This leads to an inconsistent state where
menuconfig displays information indicating MINIMAL_BUILD is active,
even though it was ignored in favor of the COMPONENTS variable.

Fix this by setting the MINIMAL_BUILD property to OFF if the
COMPONENTS variable is used.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2026-01-09 11:09:41 +01:00
committed by BOT
parent 7f2f009b5f
commit b12bc58494
+1
View File
@@ -503,6 +503,7 @@ function(__project_init components_var test_components_var)
if(DEFINED COMPONENTS)
message(WARNING "The MINIMAL_BUILD property is disregarded because the COMPONENTS variable is defined.")
set(minimal_build OFF)
idf_build_set_property(MINIMAL_BUILD OFF)
else()
set(COMPONENTS main ${TEST_COMPONENTS})
set(minimal_build ON)