From 267d039295cd76fc44a93a30fa94d48bc9cf07e2 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Tue, 12 Dec 2023 15:14:33 +0100 Subject: [PATCH] cmake: NUTTX_COMMON_DIR must be set after .config definitions are included otherwise NUTTX_COMMON_DIR is empty if CONFIG_ARCH_BOARD_COMMON is set from menuconfig Co-authored-by: hartmannathan <59230071+hartmannathan@users.noreply.github.com> --- CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index efddcd1be9..80f03424ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -262,15 +262,6 @@ else() file(TOUCH ${CMAKE_BINARY_DIR}/drivers/platform/Kconfig) endif() -# board common directory - -if(CONFIG_ARCH_BOARD_COMMON) - file( - GLOB NUTTX_COMMON_DIR - LIST_DIRECTORIES true - "${NUTTX_DIR}/boards/${CONFIG_ARCH}/${CONFIG_ARCH_CHIP}/common") -endif() - # Custom chip ################################################### if(CONFIG_ARCH_CHIP_CUSTOM) @@ -388,6 +379,15 @@ include(FetchContent) set(FETCHCONTENT_QUIET OFF) +# Board common directory ##################################################### + +if(CONFIG_ARCH_BOARD_COMMON) + file( + GLOB NUTTX_COMMON_DIR + LIST_DIRECTORIES true + "${NUTTX_DIR}/boards/${CONFIG_ARCH}/${CONFIG_ARCH_CHIP}/common") +endif() + # Setup toolchain ############################################################ # This needs to happen before project() when binaries are searched for