mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00

Currently, several example dependencies rely on the fact that all registered components are added to the build, along with components specified in common requirements. This results in longer build times because even unused components must be built. Switch all examples to use idf_minimal_build to compile only the components actually required by the example. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
19 lines
699 B
CMake
19 lines
699 B
CMake
# This is the project CMakeLists.txt file for the test subproject
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
# Include the components directory of the main application:
|
|
#
|
|
set(EXTRA_COMPONENT_DIRS "../components")
|
|
|
|
# Set the components to include the tests for.
|
|
# This can be overridden from CMake cache:
|
|
# - when invoking CMake directly: cmake -D TEST_COMPONENTS="xxxxx" ..
|
|
# - when using idf.py: idf.py -T xxxxx build
|
|
#
|
|
set(TEST_COMPONENTS "testable" CACHE STRING "List of components to test")
|
|
|
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
|
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
|
idf_build_set_property(MINIMAL_BUILD ON)
|
|
project(unit_test_test)
|