]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
blk/CMakeLists.txt: generate interface library if `libblk` is disabled
authorMax Kellermann <max.kellermann@ionos.com>
Mon, 14 Oct 2024 19:21:58 +0000 (21:21 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Mon, 14 Oct 2024 19:37:02 +0000 (21:37 +0200)
commit19b406f8d24dc4ca6ed11beaffe26174933e2501
tree73013aefa6cb96eb1dd1c9fe960e0d6b7dae33ac
parent24378a07263f3ee7bc6f8d100e24e5d39d2dd71c
blk/CMakeLists.txt: generate interface library if `libblk` is disabled

If all the libraries which `libblk` wraps (i.e. Bluestore, AIO, SPDK,
ZBD) are disabled, then the build aborts with a linker failure:

```
 c++ [...] -o bin/ceph-mon [...] -lblk [...]
 mold: fatal: library not found: blk
 collect2: error: ld returned 1 exit status
```

This is because `blk` is used (via `os`) but if the `add_library()`
directive is skipped, `cmake` attempts to look up a library with that
name.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/blk/CMakeLists.txt