1# SPDX-License-Identifier: Apache-2.0
2
3# To avoid a lot of empty CMakeLists.txt files we assume it is not an
4# error if it is missing
5
6if(EXISTS ${BOARD_DIR}/CMakeLists.txt)
7  if(USING_OUT_OF_TREE_BOARD)
8	set(build_dir boards/${ARCH}/${BOARD})
9  else()
10	unset(build_dir)
11
12	# FIXME: SHADOW_VARS: Remove this once we have enabled -Wshadow globally.
13	#
14	# For now, only enable warning for shadow variables for in-tree boards.
15	add_compile_options($<TARGET_PROPERTY:compiler,warning_shadow_variables>)
16  endif()
17
18  add_subdirectory(${BOARD_DIR} ${build_dir})
19endif()
20