cmake: CMake soc dir variable improvements for HWMv2
Create SOC_<soc>_DIR in addition to SOC_<SOC>_DIR variable. Clear intermediate variables constructed by cmake_parse_arguments. Set SOC_V2_DIR to point to the SoC dir of the actual SoC in use. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
committed by
Jamie McCrae
parent
a188e01a12
commit
05b50f6691
@@ -78,6 +78,8 @@ while(TRUE)
|
||||
else()
|
||||
set(setting_name SOC_${HWM_TYPE}_${SOC_V2_NAME}_DIR)
|
||||
endif()
|
||||
# We support both SOC_foo_DIR and SOC_FOO_DIR.
|
||||
set(${setting_name} ${SOC_V2_DIR})
|
||||
string(TOUPPER ${setting_name} setting_name)
|
||||
set(${setting_name} ${SOC_V2_DIR})
|
||||
endif()
|
||||
@@ -106,3 +108,10 @@ kconfig_gen("${KCONFIG_BINARY_DIR}/arch" "${arch_kconfig_file}" "${kconfig_arch_
|
||||
kconfig_gen("${KCONFIG_BINARY_DIR}/soc" "${soc_defconfig_file}" "${kconfig_soc_source_dir}")
|
||||
kconfig_gen("${KCONFIG_BINARY_DIR}/soc" "${soc_zephyr_file}" "${kconfig_soc_source_dir}")
|
||||
kconfig_gen("${KCONFIG_BINARY_DIR}/soc" "${soc_kconfig_file}" "${kconfig_soc_source_dir}")
|
||||
|
||||
# Clear variables created by cmake_parse_arguments
|
||||
unset(SOC_V2_NAME)
|
||||
unset(SOC_V2_DIR)
|
||||
unset(SOC_V2_HWM)
|
||||
unset(ARCH_V2_NAME)
|
||||
unset(ARCH_V2_DIR)
|
||||
|
||||
@@ -26,4 +26,5 @@ if(HWMv2)
|
||||
set(SOC_SERIES ${CONFIG_SOC_SERIES})
|
||||
set(SOC_TOOLCHAIN_NAME ${CONFIG_SOC_TOOLCHAIN_NAME})
|
||||
set(SOC_FAMILY ${CONFIG_SOC_FAMILY})
|
||||
set(SOC_V2_DIR ${SOC_${SOC_NAME}_DIR})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user