2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2017-10-27 21:43:34 +08:00
|
|
|
# To avoid a lot of empty CMakeLists.txt files we assume it is not an
|
|
|
|
# error if it is missing
|
|
|
|
|
|
|
|
if(EXISTS ${BOARD_DIR}/CMakeLists.txt)
|
2018-09-28 00:10:22 +08:00
|
|
|
if(USING_OUT_OF_TREE_BOARD)
|
2018-09-27 23:15:24 +08:00
|
|
|
set(build_dir boards/${ARCH}/${BOARD})
|
2018-02-12 12:30:57 +08:00
|
|
|
else()
|
2018-09-27 23:15:24 +08:00
|
|
|
unset(build_dir)
|
2023-08-12 04:40:05 +08:00
|
|
|
|
|
|
|
# FIXME: SHADOW_VARS: Remove this once we have enabled -Wshadow globally.
|
|
|
|
#
|
|
|
|
# For now, only enable warning for shadow variables for in-tree boards.
|
|
|
|
add_compile_options($<TARGET_PROPERTY:compiler,warning_shadow_variables>)
|
2018-02-12 12:30:57 +08:00
|
|
|
endif()
|
2018-09-27 23:15:24 +08:00
|
|
|
|
|
|
|
add_subdirectory(${BOARD_DIR} ${build_dir})
|
2017-10-27 21:43:34 +08:00
|
|
|
endif()
|