From 8ab4d3c950204b18c04e7f5d497fbbadb413990e Mon Sep 17 00:00:00 2001 From: xuxin19 Date: Mon, 11 Mar 2024 21:49:33 +0800 Subject: [PATCH] cmake:sanity check to avoid custom board not providing Kconfig by default Signed-off-by: xuxin19 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13aad37aaf..7b3059077e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,7 +245,7 @@ else() endif() if(NOT EXISTS ${CMAKE_BINARY_DIR}/boards/dummy/Kconfig) - if(CONFIG_ARCH_BOARD_CUSTOM) + if(CONFIG_ARCH_BOARD_CUSTOM AND EXISTS ${NUTTX_BOARD_ABS_DIR}/Kconfig) nuttx_create_symlink(${NUTTX_BOARD_ABS_DIR}/Kconfig ${CMAKE_BINARY_DIR}/boards/dummy/Kconfig) else() @@ -282,7 +282,7 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/arch/dummy) endif() if(NOT EXISTS ${CMAKE_BINARY_DIR}/arch/dummy/Kconfig) - if(CONFIG_ARCH_CHIP_CUSTOM) + if(CONFIG_ARCH_CHIP_CUSTOM AND EXISTS ${NUTTX_CHIP_ABS_DIR}/Kconfig) nuttx_create_symlink(${NUTTX_CHIP_ABS_DIR}/Kconfig ${CMAKE_BINARY_DIR}/arch/dummy/Kconfig) else()