]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake: guard unittest_global_doublefree with WITH_LIBCEPHFS 66848/head
authorKefu Chai <k.chai@proxmox.com>
Thu, 8 Jan 2026 23:43:13 +0000 (07:43 +0800)
committerKefu Chai <k.chai@proxmox.com>
Fri, 9 Jan 2026 04:53:41 +0000 (12:53 +0800)
commit985c9607f66c08c032394a8ae0aa3f7968da5b44
treecf576e026b7e93f0b9483ab2824e6d6954845e7d
parent533f2c7f72f9f3eac10fc4b43b68992e61e01b50
cmake: guard unittest_global_doublefree with WITH_LIBCEPHFS

The unittest_global_doublefree test detects double-free issues in
global static variables when an executable links both librados and
libcephfs. However, it was incorrectly guarded by WITH_CEPHFS (which
controls the server-side cephfs components) instead of WITH_LIBCEPHFS
(which controls the client library it actually depends on).

This causes build failures when building with WITH_LIBCEPHFS enabled
but WITH_CEPHFS disabled:

```
    /usr/bin/ld: cannot find -lcephfs: No such file or directory
```

Change the guard to WITH_LIBCEPHFS to match the actual dependency.

While this scenario is uncommon (most users enable WITH_CEPHFS), the
fix correctly aligns the build logic with the test's dependencies.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/test/common/CMakeLists.txt