Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
f07f074
Picked/merged all Store-related modifications from feature/daos_handle.
nicolau-manubens Feb 9, 2024
6e4de59
Draft S3Store. Includes code for design alternatives including object…
nicolau-manubens Feb 10, 2024
e4ebfa4
Tidying.
nicolau-manubens Feb 11, 2024
c3d4c30
Specifying an endpoint in all S3Names. Adding a configurable prefix f…
nicolau-manubens Feb 12, 2024
2215a6c
Minor changes.
nicolau-manubens Feb 12, 2024
53a7455
Updated code to comply with agreed eckit S3 APIs.
nicolau-manubens Feb 14, 2024
6393852
Modifications for the S3Store to fully build and run with the eckit S…
nicolau-manubens Feb 17, 2024
e503401
Fixed authorship.
nicolau-manubens Feb 17, 2024
23fdb9f
First feature/rados-backend branch commit. Removing content from S3 b…
nicolau-manubens Feb 29, 2024
677935d
Remove leftover s3 content.
nicolau-manubens Feb 29, 2024
5ed2b66
Remove leftover s3 content.
nicolau-manubens Feb 29, 2024
07f02fa
Functional RadosStore backend. Supports several modes: pool per DB, s…
nicolau-manubens Mar 2, 2024
7f10ff2
Merged latest develop.
nicolau-manubens Jun 14, 2024
1f3f15a
Fixes to enable DAOS backend unit tests by default.
nicolau-manubens Jun 22, 2024
dd5729c
Added RadosCatalogue with archive, retrieve and list.
nicolau-manubens Jun 22, 2024
fe324d1
Rados wait_for_safe is deprecated. Only possible to do async IO and e…
nicolau-manubens Jun 23, 2024
006bea5
Added RadosCatalogue unit tests and several fixes.
nicolau-manubens Jun 25, 2024
6af5bba
Improved name of the Rados backend configuration item to limit part s…
nicolau-manubens Jun 30, 2024
0720e7d
Not closing Rados multipart handles on flush.
nicolau-manubens Jun 30, 2024
08b1263
Fix in RadosStore in multipart mode and persist on write mode.
nicolau-manubens Jun 30, 2024
020d69f
Improve Ceph backends cmake parameters.
nicolau-manubens Jun 5, 2025
a7afcdb
Fix Rados backend tests after adding RadosPartHandle.
nicolau-manubens Jun 8, 2025
fee0ca6
Merge branch 'develop' into feature/ceph-backend
mcakircali Jun 30, 2026
b6b5216
fix daos
mcakircali Jun 30, 2026
f7ac0de
fix rados commong
mcakircali Jul 3, 2026
6c795dc
fix rados cat
mcakircali Jul 3, 2026
70b6fc0
fix rados engine
mcakircali Jul 3, 2026
d72f9ed
fix rados store
mcakircali Jul 3, 2026
d41d808
update rados cmake
mcakircali Jul 3, 2026
ebab597
merge: undo
mcakircali Jul 6, 2026
4c7f92c
merge: undo
mcakircali Jul 6, 2026
2bc9a19
merge: undo
mcakircali Jul 6, 2026
cbfdf16
fix(rados): test name
mcakircali Jul 6, 2026
eb65861
fix(rados): catalogue
mcakircali Jul 7, 2026
edacdf2
fix(rados): catalogue read
mcakircali Jul 7, 2026
3c6a513
fix(rados): catalogue write
mcakircali Jul 7, 2026
f712fc6
fix(rados): common
mcakircali Jul 7, 2026
fc632fd
fix(rados): engine
mcakircali Jul 7, 2026
52eafdf
fix(rados): index
mcakircali Jul 7, 2026
fd63eb2
fix(rados): field location
mcakircali Jul 7, 2026
d1548a7
fix(rados): store
mcakircali Jul 7, 2026
17b9f4c
fix(rados): tests
mcakircali Jul 7, 2026
0aa9a98
fix(rados): index
mcakircali Jul 7, 2026
c3f2436
fix(rados): store
mcakircali Jul 7, 2026
dd7b310
fix(rados): common
mcakircali Jul 7, 2026
b809691
fix(rados): tests
mcakircali Jul 7, 2026
2e85e33
Merge branch 'develop' into feature/ceph-backend
mcakircali Jul 7, 2026
1f815bd
fix(ceph): common
mcakircali Jul 7, 2026
6205215
fix(ceph): find rados
mcakircali Jul 8, 2026
30ba31e
fix(ci): undo me
mcakircali Jul 8, 2026
a5a4c5e
fix(ceph): restore
mcakircali Jul 8, 2026
50fe570
fix(ceph): add ci
mcakircali Jul 9, 2026
382cedc
fix(ceph): undo me ci
mcakircali Jul 9, 2026
cbdc802
fix(ceph): ci
mcakircali Jul 9, 2026
12ee3c7
fix(ceph): ci flags
mcakircali Jul 9, 2026
5ac112c
fix(ceph): ci avoid duplicates
mcakircali Jul 9, 2026
bc1defc
fix(ceph): ci eckit branch
mcakircali Jul 9, 2026
1344fea
fix(ceph): ci
mcakircali Jul 10, 2026
67e134f
fix(ceph): header include
mcakircali Jul 13, 2026
e302cc3
fix(uuid): findlibuuid.cmake
mcakircali Jul 17, 2026
7426333
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Jul 20, 2026
e12f144
Merge branch 'fix/libuuid' into feature/FDB-683-ceph-backend
mcakircali Jul 21, 2026
eed1008
Merge branch 'fix/libuuid' into feature/FDB-683-ceph-backend
mcakircali Jul 21, 2026
337c6ee
feat: add copilot instructions
mcakircali Jul 21, 2026
019db0d
fix(cmake): remove uuid cmake
mcakircali Jul 21, 2026
e1a6cf6
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Jul 22, 2026
2e4457c
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Jul 22, 2026
c8ee456
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Jul 24, 2026
5380786
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Jul 27, 2026
e5904bf
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Aug 3, 2026
e0bbe89
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Aug 5, 2026
0e61584
fix(ceph): typos
mcakircali Aug 5, 2026
d9f6ea3
fix(ceph): engine
mcakircali Aug 5, 2026
17a6063
fix(ceph): remove single pool option
mcakircali Aug 5, 2026
e85eb1e
fix(ceph): remove option obj per field
mcakircali Aug 5, 2026
b9dbb8a
fix(ceph): default option multipart
mcakircali Aug 5, 2026
b05d2e5
refactor(ceph): rados_admin
mcakircali Aug 5, 2026
1b2c16d
tests(ceph): clean pools
mcakircali Aug 5, 2026
30429b8
fix(ceph): headers
mcakircali Aug 5, 2026
17efbc2
fix(ceph): loop
mcakircali Aug 5, 2026
a9d3ef6
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Aug 12, 2026
5452f3d
fix(rados): field location
mcakircali Aug 13, 2026
dab2487
fix(rados): store
mcakircali Aug 13, 2026
afc86a5
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Aug 13, 2026
bab8deb
fix(rados): ci
mcakircali Aug 18, 2026
7145326
fix(rados): readme
mcakircali Aug 18, 2026
c97ce97
fix(rados): cat deselect index
mcakircali Aug 18, 2026
83c68e0
fix(rados): cat writer
mcakircali Aug 18, 2026
5596bb5
fix(rados): common
mcakircali Aug 18, 2026
e5ae3be
fix(rados): engine
mcakircali Aug 18, 2026
0d0a393
fix(rados): store close data handles
mcakircali Aug 18, 2026
87563db
fix(rados): index len
mcakircali Aug 18, 2026
5e0fcf2
test(rados): add regressions close
mcakircali Aug 18, 2026
7516305
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Aug 18, 2026
9f7346d
chore(rados): include
mcakircali Aug 18, 2026
502bbec
test(rados): fix cat
mcakircali Aug 18, 2026
ae62eb5
ci(rados): fix ceph cluster
mcakircali Aug 19, 2026
e638686
ci(rados): pin ceph docker image
mcakircali Aug 19, 2026
ec2da2f
test(rados): add wipe
mcakircali Aug 19, 2026
18f36e8
feat(rados): add wipe
mcakircali Aug 19, 2026
c67e591
feat(rados): cat writer
mcakircali Aug 19, 2026
d7230b5
chore(rados): cleanup
mcakircali Aug 19, 2026
0fb4618
fix(rados): URI reopen
mcakircali Aug 19, 2026
ce241a8
test(rados): report missing db
mcakircali Aug 19, 2026
37d7a99
feat(rados): safe cleanup and close
mcakircali Aug 19, 2026
5687a63
chore(rados): cleanup
mcakircali Aug 19, 2026
9570a09
docs(rados): cleanup
mcakircali Aug 19, 2026
a0161b5
docs(rados): cleanup
mcakircali Aug 19, 2026
d2801b6
feat(rados): wipe -> wipe
mcakircali Aug 19, 2026
a6ddaf7
feat(rados): removed remapkey, dedup read_db_key
mcakircali Aug 19, 2026
bfe48df
feat(rados): add stats
mcakircali Aug 19, 2026
8203814
feat(rados): concurrent write
mcakircali Aug 19, 2026
fae75fb
test(rados): uri and wipe hidden
mcakircali Aug 19, 2026
a865cc0
feat(rados): add spaces
mcakircali Aug 19, 2026
d0180fc
ci(rados): fix size 1
mcakircali Aug 19, 2026
e5a66fb
ci(rados): bump version
mcakircali Aug 20, 2026
9228d5d
ci(rados): fix polling
mcakircali Aug 20, 2026
890d9dc
ci(rados): add health
mcakircali Aug 20, 2026
755e65c
fix include
mcakircali Aug 20, 2026
7800d0b
fix include
mcakircali Aug 20, 2026
f782557
test(rados): cleanup at end
mcakircali Aug 20, 2026
cb57f75
test(rados): fdb5 manage pools
mcakircali Aug 20, 2026
1eda53f
Merge branch 'develop' into feature/FDB-683-ceph-backend
mcakircali Aug 24, 2026
63cd125
docs(rados): add rados backend
mcakircali Aug 25, 2026
0e73a27
ignore doc-build
mcakircali Aug 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ci-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dependencies: |
ecmwf/ecbuild
Deutsches-Klimarechenzentrum/libaec@refs/tags/v1.1.6
ecmwf/eccodes
ecmwf/eckit
ecmwf/eckit@feature/ECKIT-684-ceph-backend
ecmwf/metkit
dependency_branch: develop
cmake_options: -DENABLE_MEMFS=ON -DENABLE_DUMMY_DAOS=ON -DENABLE_FAMFDB=ON
Expand Down
2 changes: 1 addition & 1 deletion .github/ci-hpc-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build:
dependencies:
- ecmwf/ecbuild@develop
- ecmwf/eccodes@develop
- ecmwf/eckit@develop
- ecmwf/eckit@feature/ECKIT-684-ceph-backend
- ecmwf/metkit@develop
cmake_options:
- -DENABLE_LUSTRE=OFF
Expand Down
253 changes: 253 additions & 0 deletions .github/workflows/ci-rados.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
name: ci-rados

on:
push:
branches:
- "master"
- "develop"
tags-ignore:
- "**"

# Trigger the workflow on pull request
pull_request: ~

# Trigger on public pull request approval
pull_request_target:
types: [labeled]

# Trigger the workflow manually
workflow_dispatch: ~

# avoid duplicate runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
rados:
name: Test Ceph/RADOS Backend
runs-on: ubuntu-latest

env:
CEPH_ETC: /etc/ceph
ECKIT_RADOS_CLUSTER_NAME: ceph
ECKIT_RADOS_CLUSTER_USER: client.admin
FDB_RADOS_TEST_POOL: fdb_test
# Install prefix shared by all bundle projects (eckit, eccodes, metkit, fdb).
INSTALL_PREFIX: ${{ github.workspace }}/install
# Local dirs used to cache apt archives and the Ceph docker image.
APT_CACHE: ${{ github.workspace }}/.apt-cache
CEPH_IMAGE: quay.io/ceph/demo@sha256:522483cf07cfce6386b8e18a3edfa88a1b32c688dee231d0a6962b1513557723
CEPH_IMAGE_CACHE: ${{ github.workspace }}/.docker-ceph
CMAKE_FLAGS: -DENABLE_AEC=OFF -DENABLE_EXAMPLES=OFF -DENABLE_EXPERIMENTAL=OFF -DENABLE_NETCDF=OFF

steps:
- name: Checkout ecbuild
uses: actions/checkout@v4
with:
repository: ecmwf/ecbuild
path: ecbuild

- name: Checkout eckit
uses: actions/checkout@v4
with:
repository: ecmwf/eckit
ref: feature/ECKIT-684-ceph-backend
path: eckit

- name: Checkout eccodes
uses: actions/checkout@v4
with:
repository: ecmwf/eccodes
path: eccodes

- name: Checkout metkit
uses: actions/checkout@v4
with:
repository: ecmwf/metkit
path: metkit

- name: Checkout fdb
uses: actions/checkout@v4
with:
path: fdb

- name: Cache apt packages
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.apt-cache
# Bump the suffix to invalidate when the package list changes.
key: apt-rados-${{ runner.os }}-v2

- name: Install build dependencies
run: |
mkdir -p "${APT_CACHE}/archives/partial"
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
-o Dir::Cache::archives="${APT_CACHE}/archives" \
-o APT::Keep-Downloaded-Packages=true \
build-essential \
cmake \
jq \
ninja-build \
gfortran \
libopenmpi-dev \
libssl-dev \
uuid-dev \
libbz2-dev \
libcurl4-openssl-dev \
libaec-dev \
librados-dev
# Make the cached .deb archives readable/writable by the runner user.
sudo chown -R "$(id -u):$(id -g)" "${APT_CACHE}"

- name: Cache Ceph image
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.docker-ceph
# Bump the suffix to refresh the pinned image snapshot.
key: ceph-image-522483cf07cf-v2

- name: Load or pull Ceph image
run: |
if [ -f "${CEPH_IMAGE_CACHE}/ceph-demo.tar" ]; then
docker load -i "${CEPH_IMAGE_CACHE}/ceph-demo.tar"
else
docker pull "${CEPH_IMAGE}"
mkdir -p "${CEPH_IMAGE_CACHE}"
docker save "${CEPH_IMAGE}" -o "${CEPH_IMAGE_CACHE}/ceph-demo.tar"
fi

- name: Start Ceph cluster
run: |
sudo mkdir -p "${CEPH_ETC}"
docker run -d --name ceph-demo \
--network host \
-e MON_IP=127.0.0.1 \
-e CEPH_PUBLIC_NETWORK=0.0.0.0/0 \
-e CEPH_DEMO_UID=ci \
-e DEMO_DAEMONS=mon,mgr,osd \
-v "${CEPH_ETC}:/etc/ceph" \
"${CEPH_IMAGE}" demo

- name: Wait for Ceph and create test pool
run: |
echo "Waiting for Ceph to become ready..."
for i in $(seq 1 60); do
if docker exec ceph-demo ceph osd pool ls >/dev/null 2>&1; then
ready=1
break
fi
sleep 5
done
if [ "${ready:-0}" != "1" ]; then
echo "Ceph did not become ready in time" >&2
docker logs ceph-demo || true
exit 1
fi
echo "Waiting for Ceph cluster health..."
for i in $(seq 1 60); do
if docker exec ceph-demo ceph health 2>/dev/null | grep -q '^HEALTH_OK'; then
health_ready=1
break
fi
sleep 5
done
if [ "${health_ready:-0}" != "1" ]; then
echo "Ceph cluster did not become healthy in time" >&2
docker exec ceph-demo ceph status || true
docker logs ceph-demo || true
exit 1
fi
docker exec ceph-demo ceph config set mon mon_allow_pool_size_one true
docker exec ceph-demo ceph osd pool create "${FDB_RADOS_TEST_POOL}" 8 8
# The demo cluster has one OSD; its test pool must use a single replica to become active+clean.
docker exec ceph-demo ceph osd pool set "${FDB_RADOS_TEST_POOL}" size 1 --yes-i-really-mean-it
docker exec ceph-demo ceph osd pool set "${FDB_RADOS_TEST_POOL}" min_size 1
docker exec ceph-demo ceph osd pool application enable "${FDB_RADOS_TEST_POOL}" rados
echo "Waiting for ${FDB_RADOS_TEST_POOL} placement groups to become active+clean..."
for i in $(seq 1 60); do
if docker exec ceph-demo ceph pg stat 2>/dev/null | \
awk '$2 == "pgs:" { gsub("[,;]", "", $4); exit !($1 == $3 && $4 == "active+clean") }'; then
pool_ready=1
break
fi
sleep 5
done
if [ "${pool_ready:-0}" != "1" ]; then
echo "Ceph test pool did not become active+clean in time" >&2
docker exec ceph-demo ceph status || true
docker exec ceph-demo ceph pg stat || true
exit 1
fi
sudo chmod 0644 "${CEPH_ETC}/ceph.client.admin.keyring"

- name: Build eckit
run: |
# eckit locates ecbuild via find_package(ecbuild ... HINTS .../../ecbuild),
# which resolves to the sibling ecbuild checkout above.
cmake -S eckit -B build/eckit -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
${CMAKE_FLAGS} \
-DENABLE_MPI=ON \
-DENABLE_RADOS=ON \
-DENABLE_RADOS_TESTS_MANAGE_POOLS=OFF
cmake --build build/eckit --parallel
cmake --install build/eckit

- name: Build eccodes
run: |
cmake -S eccodes -B build/eccodes -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \
${CMAKE_FLAGS} \
-DENABLE_JPG=OFF \
-DENABLE_FORTRAN=ON \
-DENABLE_MEMFS=ON \
-DENABLE_ECCODES_THREADS=ON
cmake --build build/eccodes --parallel
cmake --install build/eccodes

- name: Build metkit
run: |
cmake -S metkit -B build/metkit -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \
${CMAKE_FLAGS}
cmake --build build/metkit --parallel
cmake --install build/metkit

- name: Build fdb
run: |
cmake -S fdb -B build/fdb -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \
${CMAKE_FLAGS} \
-DENABLE_RADOSFDB=ON \
-DENABLE_RADOS_TESTS_MANAGE_POOLS=OFF \
-DFDB_RADOS_TEST_POOL="${FDB_RADOS_TEST_POOL}"
cmake --build build/fdb --parallel

- name: Run RADOS FDB tests
env:
ECKIT_RADOS_CLUSTER_CONF: /etc/ceph/ceph.conf
run: |
ctest --test-dir build/fdb -L rados --output-on-failure

- name: Dump Ceph diagnostics on failure
if: failure()
run: |
echo "=== Ceph status ==="
docker exec ceph-demo ceph status || true
echo "=== Ceph capacity ==="
docker exec ceph-demo ceph df || true
echo "=== Test-pool objects ==="
docker exec ceph-demo rados -p "${FDB_RADOS_TEST_POOL}" ls || true
echo "=== CTest temporary files ==="
ls -la build/fdb/Testing/Temporary/ || true
echo "=== Ceph container logs ==="
docker logs ceph-demo || true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ __pycache__/
# Rust
rust/target/
rust/Cargo.lock
doc-build
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ ecbuild_find_package( NAME metkit VERSION 1.15 REQUIRED )
### FDB backend in CEPH object store (using Rados)

find_package( RADOS QUIET )

ecbuild_add_option( FEATURE RADOSFDB # option defined in fdb5_config.h
CONDITION eckit_HAVE_RADOS AND RADOS_FOUND
DEFAULT OFF
DESCRIPTION "Ceph/Rados support for FDB Store" )

ecbuild_add_option( FEATURE RADOS_TESTS_MANAGE_POOLS
DEFAULT OFF
DESCRIPTION "Have unit tests create pools automatically rather than using an existing pool specified in the FDB_RADOS_TEST_POOL cmake variable." )

### FDB backend in indexed filesystem with table-of-contents, i.e. TOC
### Supports Lustre parallel filesystem stripping control

Expand Down
80 changes: 41 additions & 39 deletions cmake/FindRADOS.cmake
Original file line number Diff line number Diff line change
@@ -1,49 +1,51 @@
# (C) Copyright 2011- ECMWF.
# (C) Copyright 2026- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.

# - Try to find Rados
# Once done this will define
#
# RADOS_FOUND - system has Armadillo
# RADOS_INCLUDE_DIRS - the Armadillo include directory
# RADOS_LIBRARIES - the Armadillo library
# RADOS_VERSION - This is set to $major.$minor.$patch (eg. 0.9.8)
#
# The following paths will be searched with priority if set in CMake or env
# This module defines the following variables:
# RADOS_INCLUDE_DIRS - Where to find rados/librados.h
# RADOS_LIBRARIES - The libraries needed to use Rados
# RADOS_FOUND - True if Rados was found
#
# RADOS_PATH - prefix path of the Armadillo installation
# RADOS_ROOT - Set this variable to the root installation

# Search with priority for RADOS_PATH if given as CMake or env var

find_path(RADOS_INCLUDE_DIR rados/librados.hpp
HINTS $ENV{RADOS_ROOT} ${RADOS_ROOT}
PATHS ${RADOS_PATH} ENV RADOS_PATH
PATH_SUFFIXES include NO_DEFAULT_PATH)

find_path(RADOS_INCLUDE_DIR rados/librados.hpp PATH_SUFFIXES include )

# Search with priority for RADOS_PATH if given as CMake or env var
find_library(RADOS_LIBRARY rados
HINTS $ENV{RADOS_ROOT} ${RADOS_ROOT}
PATHS ${RADOS_PATH} ENV RADOS_PATH
PATH_SUFFIXES lib64 lib NO_DEFAULT_PATH)

find_library( RADOS_LIBRARY rados PATH_SUFFIXES lib64 lib )

set( RADOS_LIBRARIES ${RADOS_LIBRARY} )
set( RADOS_INCLUDE_DIRS ${RADOS_INCLUDE_DIR} )

# This module also defines the following IMPORTED target:
# Ceph::RADOS

# Find the header path by looking for the subdirectory file
find_path(RADOS_INCLUDE_DIR
NAMES rados/librados.h
DOC "Path to Rados include directory"
)

# Find the library
find_library(RADOS_LIBRARY
NAMES rados
DOC "Path to Rados library"
)

# Handle the QUIETLY and REQUIRED arguments and set RADOS_FOUND to TRUE if
# all listed variables are TRUE.
include(FindPackageHandleStandardArgs)

# handle the QUIET and REQUIRED arguments and set RADOS_FOUND to TRUE
# if all listed variables are TRUE
# Note: capitalisation of the package name must be the same as in the file name
find_package_handle_standard_args(RADOS DEFAULT_MSG RADOS_LIBRARY RADOS_INCLUDE_DIR)

find_package_handle_standard_args(RADOS
REQUIRED_VARS RADOS_LIBRARY RADOS_INCLUDE_DIR
)

if(RADOS_FOUND)
set(RADOS_LIBRARIES ${RADOS_LIBRARY})
set(RADOS_INCLUDE_DIRS ${RADOS_INCLUDE_DIR})

# Create an modern generic imported target
if(NOT TARGET Ceph::RADOS)
add_library(Ceph::RADOS UNKNOWN IMPORTED)
set_target_properties(Ceph::RADOS PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${RADOS_INCLUDE_DIRS}"
IMPORTED_LOCATION "${RADOS_LIBRARY}"
)
endif()
endif()

# Hide these variables from the GUI cache view
mark_as_advanced(RADOS_INCLUDE_DIR RADOS_LIBRARY)
Loading
Loading