nuttx/cmake: improve board specific Toolchain.cmake

remove limitation that only custom board can have
     board specific Toolchain.cmake

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
wangchengdong
2025-09-16 20:17:16 +08:00
committed by Xiang Xiao
parent 4a391c4e7f
commit 7f407476f9

View File

@@ -447,13 +447,11 @@ endif()
# Setup platform options (this needs to happen after project(), once the
# toolchain file has been processed)
# Support custom Toolchain options by custom Boards
if(CONFIG_ARCH_BOARD_CUSTOM)
if(EXISTS ${NUTTX_BOARD_ABS_DIR}/cmake
AND EXISTS ${NUTTX_BOARD_ABS_DIR}/cmake/Toolchain.cmake)
# must be added AFTER ToolchainFile and BEFORE platform
include(${NUTTX_BOARD_ABS_DIR}/cmake/Toolchain.cmake)
endif()
# Support board Toolchain options
if(EXISTS ${NUTTX_BOARD_ABS_DIR}/cmake
AND EXISTS ${NUTTX_BOARD_ABS_DIR}/cmake/Toolchain.cmake)
# must be added AFTER ToolchainFile and BEFORE platform
include(${NUTTX_BOARD_ABS_DIR}/cmake/Toolchain.cmake)
endif()
include(platform)