From c7c86de62182c3059854b667f5ed7c27d49b24c5 Mon Sep 17 00:00:00 2001 From: Robert Lubos Date: Fri, 1 Sep 2023 12:47:54 +0200 Subject: [PATCH] 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 --- drivers/ethernet/CMakeLists.txt | 1 + drivers/wifi/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/ethernet/CMakeLists.txt b/drivers/ethernet/CMakeLists.txt index e343c90a10c..6f963cd68d0 100644 --- a/drivers/ethernet/CMakeLists.txt +++ b/drivers/ethernet/CMakeLists.txt @@ -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 diff --git a/drivers/wifi/CMakeLists.txt b/drivers/wifi/CMakeLists.txt index 8434d61096a..b12ecf88a3e 100644 --- a/drivers/wifi/CMakeLists.txt +++ b/drivers/wifi/CMakeLists.txt @@ -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)