From 53f390fb62cd486faddb9ffc7928eb3eb78f3375 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Tue, 15 Nov 2022 11:10:18 +0800 Subject: [PATCH] build_system: stop looking for sdkconfig file specified by env var `SDKCONFIG_DEFAULTS` in bootloader subproject --- tools/cmake/project.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/cmake/project.cmake b/tools/cmake/project.cmake index b081973fc2..60a1d73a0e 100644 --- a/tools/cmake/project.cmake +++ b/tools/cmake/project.cmake @@ -340,7 +340,14 @@ macro(project project_name) # PROJECT_NAME is taken from the passed name from project() call # PROJECT_DIR is set to the current directory # PROJECT_VER is from the version text or git revision of the current repo - set(_sdkconfig_defaults "$ENV{SDKCONFIG_DEFAULTS}") + + # SDKCONFIG_DEFAULTS environment variable may specify a file name relative to the root of the project. + # When building the bootloader, ignore this variable, since: + # 1. The bootloader project uses an existing SDKCONFIG file from the top-level project + # 2. File specified by SDKCONFIG_DEFAULTS will not be found relative to the root of the bootloader project + if(NOT BOOTLOADER_BUILD) + set(_sdkconfig_defaults "$ENV{SDKCONFIG_DEFAULTS}") + endif() if(NOT _sdkconfig_defaults) if(EXISTS "${CMAKE_SOURCE_DIR}/sdkconfig.defaults")