Skip to content

Commit 3a2e311

Browse files
committed
fix compatibility issues
1 parent 23b78f2 commit 3a2e311

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

LegacyFindPackages.cmake

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ endif ()
9393
message("Protobuf_INCLUDE_DIRS: " ${Protobuf_INCLUDE_DIRS})
9494
message("Protobuf_LIBRARIES: " ${Protobuf_LIBRARIES})
9595

96-
find_package(roaring REQUIRED)
97-
9896
# NOTE: CMake might not find curl and zlib on some platforms like Ubuntu, in this case, find them manually
9997
set(CURL_NO_CURL_CMAKE ON)
10098
find_package(curl QUIET)
@@ -119,6 +117,17 @@ if (NOT ZLIB_INCLUDE_DIRS OR NOT ZLIB_LIBRARIES)
119117
message(FATAL_ERROR "Could not find zlib")
120118
endif ()
121119

120+
find_package(roaring QUIET)
121+
if (NOT ROARING_FOUND)
122+
find_path(ROARING_INCLUDE_DIRS NAMES roaring/roaring.hh)
123+
find_library(ROARING_LIBRARIES NAMES roaring libroaring)
124+
endif ()
125+
message("ROARING_INCLUDE_DIRS: " ${ROARING_INCLUDE_DIRS})
126+
message("ROARING_LIBRARIES: " ${ROARING_LIBRARIES})
127+
if (NOT ROARING_INCLUDE_DIRS OR NOT ROARING_LIBRARIES)
128+
message(FATAL_ERROR "Could not find libroaring")
129+
endif ()
130+
122131
if (LINK_STATIC AND NOT VCPKG_TRIPLET)
123132
find_library(LIB_ZSTD NAMES libzstd.a)
124133
message(STATUS "ZStd: ${LIB_ZSTD}")
@@ -234,6 +243,7 @@ include_directories(
234243
${Boost_INCLUDE_DIRS}
235244
${OPENSSL_INCLUDE_DIR}
236245
${ZLIB_INCLUDE_DIRS}
246+
${ROARING_INCLUDE_DIRS}
237247
${CURL_INCLUDE_DIRS}
238248
${Protobuf_INCLUDE_DIRS}
239249
${GTEST_INCLUDE_PATH}
@@ -249,6 +259,7 @@ set(COMMON_LIBS
249259
${CURL_LIBRARIES}
250260
${OPENSSL_LIBRARIES}
251261
${ZLIB_LIBRARIES}
262+
${ROARING_LIBRARIES}
252263
${ADDITIONAL_LIBRARIES}
253264
${CMAKE_DL_LIBS}
254265
)

dependencies.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ zstd: 1.5.5
2626
snappy: 1.1.10
2727
openssl: 1.1.1w
2828
curl: 8.6.0
29+
roaring: 0.2.66

lib/NegativeAcksTracker.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "NegativeAcksTracker.h"
2121

22-
#include <bits/stdint-uintn.h>
22+
#include <cstdint>
2323

2424
#include <functional>
2525
#include <set>

0 commit comments

Comments
 (0)