cmake: remove _if_kconfig() functions

This set of functions seem to be there just because of historical
reasons, stemming from Kbuild. They are non-obvious and prone to errors,
so remove them in favor of the `_ifdef()` ones with an explicit
`CONFIG_` condition.

Script used:

git grep -l _if_kconfig | xargs sed -E -i
"s/_if_kconfig\(\s*(\w*)/_ifdef(CONFIG_\U\1\E \1/g"

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2020-07-31 13:52:40 +02:00 committed by Carles Cufí
commit 244f826e3c
29 changed files with 129 additions and 161 deletions

View file

@ -1,14 +1,14 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_sources_if_kconfig(uart_console.c)
zephyr_sources_if_kconfig(ram_console.c)
zephyr_sources_if_kconfig(rtt_console.c)
zephyr_sources_if_kconfig(ipm_console_receiver.c)
zephyr_sources_if_kconfig(ipm_console_sender.c)
zephyr_sources_if_kconfig(uart_mcumgr.c)
zephyr_sources_if_kconfig(uart_pipe.c)
zephyr_sources_if_kconfig(xtensa_sim_console.c)
zephyr_sources_if_kconfig(native_posix_console.c)
zephyr_sources_if_kconfig(uart_mux.c)
zephyr_sources_if_kconfig(gsm_mux.c)
zephyr_sources_if_kconfig(semihost_console.c)
zephyr_sources_ifdef(CONFIG_UART_CONSOLE uart_console.c)
zephyr_sources_ifdef(CONFIG_RAM_CONSOLE ram_console.c)
zephyr_sources_ifdef(CONFIG_RTT_CONSOLE rtt_console.c)
zephyr_sources_ifdef(CONFIG_IPM_CONSOLE_RECEIVER ipm_console_receiver.c)
zephyr_sources_ifdef(CONFIG_IPM_CONSOLE_SENDER ipm_console_sender.c)
zephyr_sources_ifdef(CONFIG_UART_MCUMGR uart_mcumgr.c)
zephyr_sources_ifdef(CONFIG_UART_PIPE uart_pipe.c)
zephyr_sources_ifdef(CONFIG_XTENSA_SIM_CONSOLE xtensa_sim_console.c)
zephyr_sources_ifdef(CONFIG_NATIVE_POSIX_CONSOLE native_posix_console.c)
zephyr_sources_ifdef(CONFIG_UART_MUX uart_mux.c)
zephyr_sources_ifdef(CONFIG_GSM_MUX gsm_mux.c)
zephyr_sources_ifdef(CONFIG_SEMIHOST_CONSOLE semihost_console.c)