@@ -270,24 +270,21 @@ if(CONFIG_ARCH_BOARD_CUSTOM)
270270 ABSOLUTE BASE_DIR ${NUTTX_DIR} )
271271else ()
272272 set (NUTTX_BOARD_ABS_DIR ${NUTTX_BOARD_DIR} )
273- file (TOUCH ${CMAKE_BINARY_DIR} /boards/dummy/Kconfig)
274273endif ()
275274
276275# check if board custom dir points to NuttX upstream board. This is useful when
277276# an out-of-tree configuration uses an upstream board directory
278277string (FIND "${CONFIG_ARCH_BOARD_CUSTOM_DIR} " "boards/" IS_NUTTX_BOARD)
279278
280- if (NOT EXISTS ${CMAKE_BINARY_DIR} /boards/dummy/Kconfig)
281- # link dummy/Kconfig only if this is not upstream board otherwise the same
282- # Kconfig file is included twice which cause CMake warnings
283- if (CONFIG_ARCH_BOARD_CUSTOM
284- AND EXISTS ${NUTTX_BOARD_ABS_DIR} /Kconfig
285- AND NOT (IS_NUTTX_BOARD EQUAL 0))
286- nuttx_create_symlink(${NUTTX_BOARD_ABS_DIR} /Kconfig
287- ${CMAKE_BINARY_DIR} /boards/dummy/Kconfig)
288- else ()
289- file (TOUCH ${CMAKE_BINARY_DIR} /boards/dummy/Kconfig)
290- endif ()
279+ # link dummy/Kconfig only if this is not upstream board otherwise the same
280+ # Kconfig file is included twice which cause CMake warnings
281+ if (CONFIG_ARCH_BOARD_CUSTOM
282+ AND EXISTS ${NUTTX_BOARD_ABS_DIR} /Kconfig
283+ AND NOT (IS_NUTTX_BOARD EQUAL 0))
284+ nuttx_create_symlink(${NUTTX_BOARD_ABS_DIR} /Kconfig
285+ ${CMAKE_BINARY_DIR} /boards/dummy/Kconfig)
286+ else ()
287+ file (TOUCH ${CMAKE_BINARY_DIR} /boards/dummy/Kconfig)
291288endif ()
292289
293290# board platform driver
@@ -318,13 +315,11 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/arch/dummy)
318315 file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR} /arch/dummy)
319316endif ()
320317
321- if (NOT EXISTS ${CMAKE_BINARY_DIR} /arch/dummy/Kconfig)
322- if (CONFIG_ARCH_CHIP_CUSTOM AND EXISTS ${NUTTX_CHIP_ABS_DIR} /Kconfig)
323- nuttx_create_symlink(${NUTTX_CHIP_ABS_DIR} /Kconfig
324- ${CMAKE_BINARY_DIR} /arch/dummy/Kconfig)
325- else ()
326- file (TOUCH ${CMAKE_BINARY_DIR} /arch/dummy/Kconfig)
327- endif ()
318+ if (CONFIG_ARCH_CHIP_CUSTOM AND EXISTS ${NUTTX_CHIP_ABS_DIR} /Kconfig)
319+ nuttx_create_symlink(${NUTTX_CHIP_ABS_DIR} /Kconfig
320+ ${CMAKE_BINARY_DIR} /arch/dummy/Kconfig)
321+ else ()
322+ file (TOUCH ${CMAKE_BINARY_DIR} /arch/dummy/Kconfig)
328323endif ()
329324
330325if (NOT EXISTS ${CMAKE_BINARY_DIR} /arch/${CONFIG_ARCH} )
0 commit comments