Jelajahi Sumber

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
Chen Jichang 2 tahun lalu
induk
melakukan
6abdc9b76e

+ 3 - 0
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)
 

+ 1 - 0
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)