1# SPDX-License-Identifier: Apache-2.0
2
3# FIXME: SHADOW_VARS: Remove this once we have enabled -Wshadow globally.
4#
5# Limit warning of shadow variables to in-tree SoC files for now.
6cmake_path(IS_PREFIX ZEPHYR_BASE "${SOC_DIR}" NORMALIZE _SOC_IS_IN_TREE)
7if(_SOC_IS_IN_TREE)
8  add_compile_options($<TARGET_PROPERTY:compiler,warning_shadow_variables>)
9endif()
10unset(_SOC_IS_IN_TREE)
11
12add_subdirectory(common)
13
14if(EXISTS ${SOC_DIR}/${ARCH}/CMakeLists.txt)
15  add_subdirectory(${SOC_DIR}/${ARCH} soc/${ARCH})
16else()
17  add_subdirectory(${SOC_DIR}/${ARCH}/${SOC_PATH} soc/${ARCH}/${SOC_PATH})
18endif()
19