]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake/rocksdb: make sure dependencies build before rocksdb 54122/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 23 Nov 2023 05:12:29 +0000 (00:12 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 27 Nov 2023 14:37:53 +0000 (09:37 -0500)
commit3a5f06fedbfe86f18bf61788c8355afb2b917f42
tree4c2f2d215ae005d5c35cf5e74f677c5ad3ed78da
parentf0bd801083444eb46eb10e331f9027c3db8ddbf6
cmake/rocksdb: make sure dependencies build before rocksdb

some of rocksdb's dependencies may not have built by the time its
ExternalProject starts, so it can fail with missing headers or
libraries. for example, `uring::uring` may itself be an ExternalProject,
and its include directory won't exist until it starts building:

```
[89/1345] Performing configure step for 'rocksdb_ext'
FAILED: src/rocksdb_ext-prefix/src/rocksdb_ext-stamp/rocksdb_ext-configure build/src/rocksdb_ext-prefix/src/rocksdb_ext-stamp/rocksdb_ext-configure
...
CMake Error in CMakeLists.txt:
  Imported target "uring::uring" includes non-existent path

    "build/src/liburing/src/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.
...
[91/1345] Performing download step (git clone) for 'liburing_ext'
Cloning into 'liburing'...
```

use `add_dependencies(rocksdb_ext)` to make sure all of its dependencies
are available before starting the build

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 353360581a0b802435ecf4273ba79f53deb710e6)
cmake/modules/BuildRocksDB.cmake