File tree Expand file tree Collapse file tree 4 files changed +18
-6
lines changed
Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,15 @@ set(HAVE_LIBURING ${WITH_LIBURING})
256256CMAKE_DEPENDENT_OPTION(WITH_SYSTEM_LIBURING "Require and build with system liburing" OFF
257257 "HAVE_LIBAIO;WITH_BLUESTORE" OFF )
258258
259+ if (WITH_LIBURING)
260+ if (WITH_SYSTEM_LIBURING)
261+ find_package (uring REQUIRED)
262+ else ()
263+ include (Builduring)
264+ build_uring()
265+ endif ()
266+ endif ()
267+
259268CMAKE_DEPENDENT_OPTION(WITH_BLUESTORE_PMEM "Enable PMDK libraries" OFF
260269 "WITH_BLUESTORE" OFF )
261270if (WITH_BLUESTORE_PMEM)
Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ function(build_rocksdb)
1111 -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} )
1212 endif ()
1313
14+ list (APPEND rocksdb_CMAKE_ARGS -DWITH_LIBURING=${WITH_LIBURING} )
15+ if (WITH_LIBURING)
16+ list (APPEND rocksdb_CMAKE_ARGS -During_INCLUDE_DIR=${URING_INCLUDE_DIR} )
17+ list (APPEND rocksdb_CMAKE_ARGS -During_LIBRARIES=${URING_LIBRARY_DIR} )
18+ list (APPEND rocksdb_INTERFACE_LINK_LIBRARIES uring::uring)
19+ endif ()
20+
1421 if (ALLOCATOR STREQUAL "jemalloc" )
1522 list (APPEND rocksdb_CMAKE_ARGS -DWITH_JEMALLOC=ON )
1623 list (APPEND rocksdb_INTERFACE_LINK_LIBRARIES JeMalloc::JeMalloc)
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ function(build_uring)
3232 ExternalProject_Get_Property(liburing_ext source_dir)
3333 set (URING_INCLUDE_DIR "${source_dir} /src/include" )
3434 set (URING_LIBRARY_DIR "${source_dir} /src" )
35+ set (URING_INCLUDE_DIR ${URING_INCLUDE_DIR} PARENT_SCOPE)
36+ set (URING_LIBRARY_DIR ${URING_LIBRARY_DIR} PARENT_SCOPE)
3537
3638 add_library (uring::uring STATIC IMPORTED GLOBAL )
3739 add_dependencies (uring::uring liburing_ext)
Original file line number Diff line number Diff line change @@ -57,11 +57,5 @@ if(WITH_EVENTTRACE)
5757endif ()
5858
5959if (WITH_LIBURING)
60- if (WITH_SYSTEM_LIBURING)
61- find_package (uring REQUIRED)
62- else ()
63- include (Builduring)
64- build_uring()
65- endif ()
6660 target_link_libraries (blk PRIVATE uring::uring)
6761endif ()
You can’t perform that action at this time.
0 commit comments