mirror of
https://github.com/apache/nuttx.git
synced 2026-03-23 14:05:12 +08:00
Cmake: add defconfig preprocess capability in Cmake build environment(recursively expand #include)
Add:
cmake/nuttx_process_config.cmake
tools/process_config.py
Update nuttx/CMakeLists.txt to call process_config defined ini
nuttx_process_config.cmake to process defconfig before actually using it
This commit is contained in:
committed by
Xiang Xiao
parent
e87c43b798
commit
be36d42da5
@@ -158,6 +158,22 @@ if(NOT EXISTS "${NUTTX_DEFCONFIG}")
|
||||
message(FATAL_ERROR "No config file found at ${NUTTX_DEFCONFIG}")
|
||||
endif()
|
||||
|
||||
# Process initial defconfig ###################################################
|
||||
# Process initial defconfig to recursively expand #include in it
|
||||
|
||||
include(nuttx_process_config)
|
||||
get_filename_component(NUTTX_DEFCONFIG_DIR "${NUTTX_DEFCONFIG}" DIRECTORY)
|
||||
process_config(
|
||||
${CMAKE_BINARY_DIR}/.defconfig.processed
|
||||
${NUTTX_DEFCONFIG}
|
||||
INCLUDE_PATHS
|
||||
${NUTTX_DEFCONFIG_DIR}/../../common/configs
|
||||
${NUTTX_DEFCONFIG_DIR}/../common
|
||||
${NUTTX_DEFCONFIG_DIR}
|
||||
${NUTTX_DIR}/../apps
|
||||
${NUTTX_DIR}/../nuttx-apps)
|
||||
set(NUTTX_DEFCONFIG ${CMAKE_BINARY_DIR}/.defconfig.processed)
|
||||
|
||||
# Generate initial .config ###################################################
|
||||
# This is needed right before any other configure step so that we can source
|
||||
# Kconfig variables into CMake variables
|
||||
|
||||
Reference in New Issue
Block a user