cache: Fix build warning 'No SOURCES given to Zephyr library'

Following 4806e1087e ,
the following warning appears for some boards (e.g. `qemu_cortex_a53`)
```
CMake Warning at /zephyr/CMakeLists.txt:798 (message):
  No SOURCES given to Zephyr library: drivers__cache

  Excluding target from build.
```

Allow this driver to have no sources.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
This commit is contained in:
Henri Xavier 2022-08-24 10:38:57 +02:00 committed by Fabio Baltieri
parent 62b7dc2a7f
commit dfededeadf

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_CACHE_ASPEED cache_aspeed.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE cache_handlers.c)