From 4ae1b0608214ae3bfa190a32437ab3b0ea2684f8 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 30 Aug 2021 18:01:43 +0200 Subject: [PATCH] cmake: kconfig: don't add empty entries to kconfigs list --- tools/cmake/kconfig.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/cmake/kconfig.cmake b/tools/cmake/kconfig.cmake index 30cec00829..420c139e81 100644 --- a/tools/cmake/kconfig.cmake +++ b/tools/cmake/kconfig.cmake @@ -163,8 +163,12 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults) # Take into account bootloader components configuration files idf_build_get_property(bootloader_kconfigs BOOTLOADER_KCONFIGS) idf_build_get_property(bootloader_kconfigs_proj BOOTLOADER_KCONFIGS_PROJ) - list(APPEND kconfigs "${bootloader_kconfigs}") - list(APPEND kconfig_projbuilds "${bootloader_kconfigs_proj}") + if(bootloader_kconfigs) + list(APPEND kconfigs "${bootloader_kconfigs}") + endif() + if(bootloader_kconfigs_proj) + list(APPEND kconfig_projbuilds "${bootloader_kconfigs_proj}") + endif() # Store the list version of kconfigs and kconfig_projbuilds idf_build_set_property(KCONFIGS "${kconfigs}")