cmake: introduce EXTRA_CONF_FILE and deprecate OVERLAY_CONFIG

This commit introduces EXTRA_CONF_FILE and deprecates OVERLAY_CONFIG.

It has often caused confusion that OVERLAY_CONFIG adds extra
configuration fragments to the value of CONF_FILE (default: prj.conf),
but the similar named variable DTC_OVERLAY_FILE replaces the default
dtc overlay file used by the build system.

To remove such confusion, this commit introduces the EXTRA_ prefix in
front of CONF_FILE to clearly indicate it's purpose.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2023-05-17 12:46:24 +02:00 committed by Carles Cufí
commit 3a345682ba
2 changed files with 6 additions and 6 deletions

View file

@ -11,7 +11,7 @@
# The following variables will be defined when this CMake module completes:
#
# - CONF_FILE: List of Kconfig fragments
# - OVERLAY_CONFIG: List of additional Kconfig fragments
# - EXTRA_CONF_FILE: List of additional Kconfig fragments
# - DTC_OVERLAY_FILE: List of devicetree overlay files
# - APPLICATION_CONFIG_DIR: Root folder for application configuration
#
@ -116,4 +116,4 @@ DTC_OVERLAY_FILE=\"dts1.overlay dts2.overlay\"")
# The DTC_OVERLAY_FILE variable is now set to its final value.
zephyr_boilerplate_watch(DTC_OVERLAY_FILE)
zephyr_get(OVERLAY_CONFIG SYSBUILD LOCAL)
zephyr_get(EXTRA_CONF_FILE SYSBUILD LOCAL VAR EXTRA_CONF_FILE OVERLAY_CONFIG)

View file

@ -79,9 +79,9 @@ if(CONF_FILE)
string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE_EXPANDED}")
endif()
if(OVERLAY_CONFIG)
string(CONFIGURE "${OVERLAY_CONFIG}" OVERLAY_CONFIG_EXPANDED)
string(REPLACE " " ";" OVERLAY_CONFIG_AS_LIST "${OVERLAY_CONFIG_EXPANDED}")
if(EXTRA_CONF_FILE)
string(CONFIGURE "${EXTRA_CONF_FILE}" EXTRA_CONF_FILE_EXPANDED)
string(REPLACE " " ";" EXTRA_CONF_FILE_AS_LIST "${EXTRA_CONF_FILE_EXPANDED}")
endif()
@ -251,7 +251,7 @@ set(
${BOARD_REVISION_CONFIG}
${CONF_FILE_AS_LIST}
${shield_conf_files}
${OVERLAY_CONFIG_AS_LIST}
${EXTRA_CONF_FILE_AS_LIST}
${EXTRA_KCONFIG_OPTIONS_FILE}
${config_files}
)