cmake: relocation of generated Kconfig file for Zephyr modules
This commit relocates the generated Kconfig.modules file from ${CMAKE_BINARY_DIR} into ${CMAKE_BINARY_DIR}/Kconfig. This is done as preparation of multiple SOC and ARCH root support. A single Kconfig folder inside ${CMAKE_BINARY_DIR} helps to keep the build folder tidy. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
13153678cb
commit
01f55a4e53
4 changed files with 9 additions and 4 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
menu "Modules"
|
||||
|
||||
source "$(CMAKE_BINARY_DIR)/Kconfig.modules"
|
||||
source "$(KCONFIG_BINARY_DIR)/Kconfig.modules"
|
||||
source "modules/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -492,6 +492,11 @@ include(${ZEPHYR_BASE}/cmake/host-tools.cmake)
|
|||
# Include board specific device-tree flags before parsing.
|
||||
include(${BOARD_DIR}/pre_dt_board.cmake OPTIONAL)
|
||||
|
||||
# Build directory for generated KConfig files, such as:
|
||||
# - Zephyr modules Kconfig files
|
||||
set(KCONFIG_BINARY_DIR ${CMAKE_BINARY_DIR}/Kconfig)
|
||||
file(MAKE_DIRECTORY ${KCONFIG_BINARY_DIR})
|
||||
|
||||
# DTS should be close to kconfig because CONFIG_ variables from
|
||||
# kconfig and dts should be available at the same time.
|
||||
#
|
||||
|
|
|
@ -43,7 +43,7 @@ set(ENV{ARCH} ${ARCH})
|
|||
set(ENV{BOARD_DIR} ${BOARD_DIR})
|
||||
set(ENV{SOC_DIR} ${SOC_DIR})
|
||||
set(ENV{SHIELD_AS_LIST} "${SHIELD_AS_LIST}")
|
||||
set(ENV{CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR})
|
||||
set(ENV{KCONFIG_BINARY_DIR} ${KCONFIG_BINARY_DIR})
|
||||
set(ENV{ARCH_DIR} ${ARCH_DIR})
|
||||
set(ENV{TOOLCHAIN_KCONFIG_DIR} "${TOOLCHAIN_KCONFIG_DIR}")
|
||||
set(ENV{EDT_PICKLE} ${EDT_PICKLE})
|
||||
|
@ -87,7 +87,7 @@ foreach(kconfig_target
|
|||
BOARD_DIR=$ENV{BOARD_DIR}
|
||||
SOC_DIR=$ENV{SOC_DIR}
|
||||
SHIELD_AS_LIST=$ENV{SHIELD_AS_LIST}
|
||||
CMAKE_BINARY_DIR=$ENV{CMAKE_BINARY_DIR}
|
||||
KCONFIG_BINARY_DIR=$ENV{KCONFIG_BINARY_DIR}
|
||||
ZEPHYR_TOOLCHAIN_VARIANT=${ZEPHYR_TOOLCHAIN_VARIANT}
|
||||
TOOLCHAIN_KCONFIG_DIR=${TOOLCHAIN_KCONFIG_DIR}
|
||||
ARCH_DIR=$ENV{ARCH_DIR}
|
||||
|
|
|
@ -18,7 +18,7 @@ if(ZEPHYR_EXTRA_MODULES)
|
|||
set(ZEPHYR_EXTRA_MODULES_ARG "--extra-modules" ${ZEPHYR_EXTRA_MODULES})
|
||||
endif()
|
||||
|
||||
set(KCONFIG_MODULES_FILE ${CMAKE_BINARY_DIR}/Kconfig.modules)
|
||||
set(KCONFIG_MODULES_FILE ${KCONFIG_BINARY_DIR}/Kconfig.modules)
|
||||
|
||||
if(WEST)
|
||||
set(WEST_ARG "--zephyr-base" ${ZEPHYR_BASE})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue