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

@ -4,5 +4,5 @@ zephyr_sources_ifdef(CONFIG_DISK_ACCESS disk_access.c)
zephyr_sources_ifdef(CONFIG_DISK_ACCESS_FLASH disk_access_flash.c)
zephyr_sources_ifdef(CONFIG_DISK_ACCESS_RAM disk_access_ram.c)
zephyr_sources_ifdef(CONFIG_DISK_ACCESS_SPI_SDHC disk_access_spi_sdhc.c)
zephyr_sources_if_kconfig(disk_access_stm32_sdmmc.c)
zephyr_sources_ifdef(CONFIG_DISK_ACCESS_STM32_SDMMC disk_access_stm32_sdmmc.c)
zephyr_sources_ifdef(CONFIG_DISK_ACCESS_USDHC disk_access_usdhc.c)