From 78d3f61757e8634c5a6b8f281347ae7d6e3146fe Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Tue, 18 Aug 2026 10:28:50 +0200 Subject: [PATCH] change(test_apps): decouple g0_components from BUILD_COMPONENTS property The BUILD_COMPONENTS build property only exists when building through the Build system v1 compatibility shim. Query the executable library interface's linked-components list instead, so the app does not depend on compatibility-only properties. --- tools/test_apps/system/g0_components/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/test_apps/system/g0_components/CMakeLists.txt b/tools/test_apps/system/g0_components/CMakeLists.txt index 8b22859e738..8e03f18b357 100644 --- a/tools/test_apps/system/g0_components/CMakeLists.txt +++ b/tools/test_apps/system/g0_components/CMakeLists.txt @@ -70,7 +70,12 @@ set(expected_components set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nostdlib") # Get all the components that were required to initialize this project -idf_build_get_property(build_components BUILD_COMPONENTS) +if(IDF_BUILD_V2) + get_target_property(library ${project_elf} LIBRARY_INTERFACE) + idf_library_get_property(build_components "${library}" LIBRARY_COMPONENTS_LINKED) +else() + idf_build_get_property(build_components BUILD_COMPONENTS) +endif() # Sort lists to be able to compare them literally list(SORT expected_components)