Skip to content

Commit cb18cae

Browse files
committed
CMakeLists.txt: Match variants by canonical board name
Uses the HWMv2 canonical board name to determine paths under variants. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent d9e27d8 commit cb18cae

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/variants/${BOARD})
4-
set(variant_dir variants/${BOARD})
5-
elseif (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/variants/${BOARD}${NORMALIZED_BOARD_QUALIFIERS})
3+
if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/variants/${BOARD}${NORMALIZED_BOARD_QUALIFIERS})
64
set(variant_dir variants/${BOARD}${NORMALIZED_BOARD_QUALIFIERS})
75
else()
8-
message(FATAL_ERROR "Variant dir not found: variants/${BOARD}, variants/${BOARD}${NORMALIZED_BOARD_QUALIFIERS}")
6+
message(FATAL_ERROR "Variant dir not found: variants/${BOARD}${NORMALIZED_BOARD_QUALIFIERS}")
97
endif()
108

119
if (CONFIG_ARDUINO_API)

0 commit comments

Comments
 (0)