| 1 | diff -Nurp a/src/CMakeLists.txt b/src/CMakeLists.txt
|
| 2 | |
| 3 | |
| 4 | @@ -432,7 +432,6 @@ set(libcommon_files
|
| 5 | ${CMAKE_BINARY_DIR}/src/include/ceph_ver.h
|
| 6 | ceph_ver.c
|
| 7 | global/global_context.cc
|
| 8 | - xxHash/xxhash.c
|
| 9 | common/error_code.cc
|
| 10 | common/tracer.cc
|
| 11 | log/Log.cc
|
| 12 | @@ -566,6 +565,8 @@ add_library(common STATIC ${ceph_common_
|
| 13 | target_link_libraries(common
|
| 14 | ${ceph_common_deps}
|
| 15 | legacy-option-headers)
|
| 16 | +pkg_check_modules(XXHASH IMPORTED_TARGET libxxhash)
|
| 17 | +target_link_libraries(common-objs PkgConfig::XXHASH)
|
| 18 | if(WITH_JAEGER)
|
| 19 | add_dependencies(common jaeger_base)
|
| 20 | endif()
|
| 21 | diff -Nurp a/src/common/Checksummer.h b/src/common/Checksummer.h
|
| 22 | |
| 23 | |
| 24 | @@ -8,7 +8,7 @@
|
| 25 | #include "include/byteorder.h"
|
| 26 | #include "include/ceph_assert.h"
|
| 27 |
|
| 28 | -#include "xxHash/xxhash.h"
|
| 29 | +#include "xxhash.h"
|
| 30 |
|
| 31 | class Checksummer {
|
| 32 | public:
|
| 33 | diff -Nurp a/src/crimson/CMakeLists.txt b/src/crimson/CMakeLists.txt
|
| 34 | |
| 35 | |
| 36 | @@ -117,7 +117,6 @@ add_library(crimson-common STATIC
|
| 37 | ${PROJECT_SOURCE_DIR}/src/osd/OSDMap.cc
|
| 38 | ${PROJECT_SOURCE_DIR}/src/osd/PGPeeringEvent.cc
|
| 39 | ${PROJECT_SOURCE_DIR}/src/common/scrub_types.cc
|
| 40 | - ${PROJECT_SOURCE_DIR}/src/xxHash/xxhash.c
|
| 41 | ${crimson_common_srcs}
|
| 42 | $<TARGET_OBJECTS:common_mountcephfs_objs>
|
| 43 | $<TARGET_OBJECTS:common-options-objs>)
|
| 44 | @@ -141,10 +140,12 @@ if(NOT WITH_SYSTEM_BOOST)
|
| 45 | list(APPEND crimson_common_deps ${ZLIB_LIBRARIES})
|
| 46 | endif()
|
| 47 |
|
| 48 | +pkg_check_modules(XXHASH IMPORTED_TARGET libxxhash)
|
| 49 | target_link_libraries(crimson-common
|
| 50 | PUBLIC
|
| 51 | ${crimson_common_public_deps}
|
| 52 | PRIVATE
|
| 53 | + PkgConfig::XXHASH
|
| 54 | crc32 arch
|
| 55 | ${crimson_common_deps}
|
| 56 | OpenSSL::Crypto)
|
| 57 | diff -Nurp a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt
|
| 58 | |
| 59 | |
| 60 | @@ -42,10 +42,12 @@ if(HAVE_LIBXFS)
|
| 61 | fs/XFS.cc)
|
| 62 | endif()
|
| 63 |
|
| 64 | +pkg_check_modules(XXHASH IMPORTED_TARGET libxxhash)
|
| 65 | add_library(os STATIC ${libos_srcs})
|
| 66 | target_link_libraries(os
|
| 67 | legacy-option-headers
|
| 68 | blk
|
| 69 | + PkgConfig::XXHASH
|
| 70 | ${FMT_LIB})
|
| 71 |
|
| 72 | target_compile_definitions(os PRIVATE -DWITH_KSTORE)
|
| 73 | diff -Nurp a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt
|
| 74 | |
| 75 | |
| 76 | @@ -288,6 +288,7 @@ if(COMPILER_SUPPORTS_WARN_IMPLICIT_CONST
|
| 77 | HAVE_WARN_IMPLICIT_CONST_INT_FLOAT_CONVERSION)
|
| 78 | endif()
|
| 79 |
|
| 80 | +pkg_check_modules(XXHASH IMPORTED_TARGET libxxhash)
|
| 81 | target_link_libraries(rgw_common
|
| 82 | PRIVATE
|
| 83 | legacy-option-headers
|
| 84 | @@ -315,6 +316,7 @@ target_link_libraries(rgw_common
|
| 85 | ${ARROW_FLIGHT_LIBRARIES}
|
| 86 | ${LMDB_LIBRARIES}
|
| 87 | PUBLIC
|
| 88 | + PkgConfig::XXHASH
|
| 89 | ${LUA_LIBRARIES}
|
| 90 | RapidJSON::RapidJSON
|
| 91 | Boost::context
|
| 92 | diff -Nurp a/src/test/neorados/read_operations.cc b/src/test/neorados/read_operations.cc
|
| 93 | |
| 94 | |
| 95 | @@ -26,7 +26,7 @@
|
| 96 | #include <boost/system/error_code.hpp>
|
| 97 | #include <boost/system/errc.hpp>
|
| 98 |
|
| 99 | -#include <xxHash/xxhash.h>
|
| 100 | +#include <xxhash.h>
|
| 101 |
|
| 102 | #include "include/neorados/RADOS.hpp"
|
| 103 | #include "include/rbd/features.h" // for RBD_FEATURES_ALL
|
| 104 | diff -Nurp a/src/test/librados/CMakeLists.txt b/src/test/librados/CMakeLists.txt
|
| 105 | |
| 106 | |
| 107 | @@ -96,16 +96,17 @@ add_executable(ceph_test_rados_api_cls
|
| 108 | target_link_libraries(ceph_test_rados_api_cls
|
| 109 | librados ${UNITTEST_LIBS} radostest-cxx)
|
| 110 |
|
| 111 | +pkg_check_modules(XXHASH IMPORTED_TARGET libxxhash)
|
| 112 | add_executable(ceph_test_rados_api_misc
|
| 113 | misc.cc
|
| 114 | $<TARGET_OBJECTS:unit-main>)
|
| 115 | target_link_libraries(ceph_test_rados_api_misc
|
| 116 | - librados global ${UNITTEST_LIBS} radostest)
|
| 117 | + PkgConfig::XXHASH librados global ${UNITTEST_LIBS} radostest)
|
| 118 | add_executable(ceph_test_rados_api_misc_pp
|
| 119 | misc_cxx.cc
|
| 120 | $<TARGET_OBJECTS:unit-main>)
|
| 121 | target_link_libraries(ceph_test_rados_api_misc_pp
|
| 122 | - librados global ${UNITTEST_LIBS} radostest-cxx)
|
| 123 | + PkgConfig::XXHASH librados global ${UNITTEST_LIBS} radostest-cxx)
|
| 124 |
|
| 125 | add_executable(ceph_test_rados_api_lock
|
| 126 | lock.cc)
|
| 127 | diff -Nurp a/src/test/neorados/CMakeLists.txt b/src/test/neorados/CMakeLists.txt
|
| 128 | |
| 129 | |
| 130 | @@ -77,7 +77,9 @@ install(TARGETS
|
| 131 | add_executable(ceph_test_neorados_read_operations
|
| 132 | read_operations.cc
|
| 133 | )
|
| 134 | + pkg_check_modules(XXHASH IMPORTED_TARGET libxxhash)
|
| 135 | target_link_libraries(ceph_test_neorados_read_operations
|
| 136 | + PkgConfig::XXHASH
|
| 137 | libneorados
|
| 138 | ${BLKID_LIBRARIES}
|
| 139 | ${CMAKE_DL_LIBS}
|
| 140 | diff -Nurp a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
|
| 141 | diff -Nurp a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
|
| 142 | |
| 143 | |
| 144 | @@ -316,6 +316,7 @@ add_executable(ceph_test_librgw_file_gp
|
| 145 | librgw_file_gp.cc
|
| 146 | )
|
| 147 | target_link_libraries(ceph_test_librgw_file_gp
|
| 148 | + PkgConfig::XXHASH
|
| 149 | rgw
|
| 150 | librados
|
| 151 | ceph-common
|
| 152 | @@ -349,7 +350,9 @@ install(TARGETS ceph_test_librgw_file_nf
|
| 153 | add_executable(ceph_test_librgw_file_aw
|
| 154 | librgw_file_aw.cc
|
| 155 | )
|
| 156 | +pkg_check_modules(XXHASH IMPORTED_TARGET libxxhash)
|
| 157 | target_link_libraries(ceph_test_librgw_file_aw
|
| 158 | + PkgConfig::XXHASH
|
| 159 | rgw
|
| 160 | librados
|
| 161 | ceph-common
|