From 6abdc9b76efcf01b11b23438d6aa1d4cb87e064b Mon Sep 17 00:00:00 2001 From: Chen Jichang Date: Fri, 9 Jun 2023 16:42:20 +0800 Subject: [PATCH] esp_adc:Trim the build components If we don't trim the build components, the build system will import all components which will increase the load of Gitlab server. Closes IDF-7459 --- components/esp_adc/test_apps/adc/CMakeLists.txt | 3 +++ components/esp_adc/test_apps/adc/main/CMakeLists.txt | 1 + 2 files changed, 4 insertions(+) diff --git a/components/esp_adc/test_apps/adc/CMakeLists.txt b/components/esp_adc/test_apps/adc/CMakeLists.txt index 36ae549fed..f5f69d47cb 100644 --- a/components/esp_adc/test_apps/adc/CMakeLists.txt +++ b/components/esp_adc/test_apps/adc/CMakeLists.txt @@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 3.16) set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components") +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +set(COMPONENTS main) + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(adc_test) diff --git a/components/esp_adc/test_apps/adc/main/CMakeLists.txt b/components/esp_adc/test_apps/adc/main/CMakeLists.txt index b545b3fc48..b6cac22db4 100644 --- a/components/esp_adc/test_apps/adc/main/CMakeLists.txt +++ b/components/esp_adc/test_apps/adc/main/CMakeLists.txt @@ -9,4 +9,5 @@ set(srcs "test_app_main.c" # In order for the cases defined by `TEST_CASE` to be linked into the final elf, # the component can be registered as WHOLE_ARCHIVE idf_component_register(SRCS ${srcs} + PRIV_REQUIRES driver esp_wifi nvs_flash esp_adc test_utils WHOLE_ARCHIVE)