mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04: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>
25 lines
933 B
CMake
25 lines
933 B
CMake
# The following lines of boilerplate have to be in your project's CMakeLists
|
|
# in this exact order for cmake to work correctly
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
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(efuse)
|
|
|
|
idf_component_get_property(esptool_py_dir esptool_py COMPONENT_DIR)
|
|
set(efuse_names "MAC" "WR_DIS")
|
|
add_custom_target(efuse-filter
|
|
COMMAND ${CMAKE_COMMAND}
|
|
-D "IDF_PATH=${IDF_PATH}"
|
|
-D "esptool_py_dir=${esptool_py_dir}"
|
|
-D "ESPEFUSEPY=${ESPEFUSEPY}"
|
|
-D "ESPEFUSEPY_OFFLINE=${CONFIG_IDF_CI_BUILD}" # Only for CI tests. Do not establish a connection with the chip
|
|
-D "IDF_TARGET=${IDF_TARGET}"
|
|
-D "efuse_names=${efuse_names}"
|
|
-P get_efuse_summary.cmake
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
|
USES_TERMINAL
|
|
VERBATIM
|
|
)
|