From 7db2b6efd8ed354def3fc71c84c6ca311982b17b Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Wed, 10 Jan 2024 12:24:30 +0100 Subject: [PATCH] cmake: cache BOARD_IDENTIFIER to preserve it between CMake invocations A CMake rerun would not extract or determine the BOARD_IDENTIFIER correctly because `list_boards.py` is only invoked for first CMake invocation. Therefore cache the BOARD_IDENTIFIER so that it's preserved between CMake re-runs. Signed-off-by: Torsten Rasmussen --- cmake/modules/boards.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/modules/boards.cmake b/cmake/modules/boards.cmake index cd4b4fd710f..9834fc03ea0 100644 --- a/cmake/modules/boards.cmake +++ b/cmake/modules/boards.cmake @@ -234,6 +234,7 @@ elseif(HWMv2) `${BOARD}` not found. Please specify a valid board.\n" "Valid board identifiers for ${BOARD_NAME} are:\n${BOARD_IDENTIFIERS}\n") endif() + set(BOARD_IDENTIFIER ${BOARD_IDENTIFIER} CACHE INTERNAL "Board identifier") endif() else() message(FATAL_ERROR "Unknown hw model (${HWM}) for board: ${BOARD}.")