drivers: wifi: Prevent CMake warnings for out-of-tree drivers

When Ethernet or Wi-Fi subsystems are enabled, but no driver source
files are provided in the Zephyr source tree (which is the case for
out-of-tree drivers), CMake throws warnings about empty libs, for
example:

  No SOURCES given to Zephyr library: drivers__ethernet
  No SOURCES given to Zephyr library: drivers__wifi

This commit sets ALLOW_EMPTY property for those libraries, to allow for
seamless out-of-tree drivers integration.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2023-09-01 12:47:54 +02:00 committed by Carles Cufí
commit c7c86de621
2 changed files with 3 additions and 0 deletions

View file

@ -1,6 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_library()
zephyr_library_property(ALLOW_EMPTY TRUE)
zephyr_library_sources_ifdef(CONFIG_ETH_GECKO
eth_gecko.c

View file

@ -1,6 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_library()
zephyr_library_property(ALLOW_EMPTY TRUE)
add_subdirectory_ifdef(CONFIG_WIFI_ESP_AT esp_at)
add_subdirectory_ifdef(CONFIG_WIFI_ESP32 esp32)
add_subdirectory_ifdef(CONFIG_WIFI_ESWIFI eswifi)