Skip to content

Commit ad3f3f2

Browse files
committed
dependencies: bump protobuf to v33.1
1 parent 92fc637 commit ad3f3f2

File tree

5 files changed

+39
-36
lines changed

5 files changed

+39
-36
lines changed

cmake/check_deps.cmake

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,16 @@ set(ABSL_DEPS
4141
absl::any
4242
)
4343

44+
if(NOT TARGET protobuf::libprotobuf)
45+
message(FATAL_ERROR "Target protobuf::libprotobuf not available.")
46+
endif()
47+
48+
4449
if(NOT TARGET re2::re2)
4550
message(FATAL_ERROR "Target re2::re2 not available.")
4651
endif()
4752
set(RE2_DEPS re2::re2)
4853

49-
if(NOT TARGET protobuf::libprotobuf)
50-
message(FATAL_ERROR "Target protobuf::libprotobuf not available.")
51-
endif()
52-
5354
# CXX Test
5455
if(BUILD_TESTING)
5556
if(NOT TARGET GTest::gtest)

cmake/dependencies/CMakeLists.txt

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,39 +46,18 @@ if(BUILD_absl)
4646
set(ABSL_USE_SYSTEM_INCLUDES ON)
4747
# We want Abseil to declare what C++ standard it was compiled with.
4848
set(ABSL_PROPAGATE_CXX_STD ON)
49+
set(ABSL_BUILD_TEST_HELPERS ON)
50+
set(ABSL_USE_EXTERNAL_GOOGLETEST ON)
51+
set(ABSL_FIND_GOOGLETEST OFF)
4952
# We want Abseil to keep the INSTALL rules enabled, even though it is a
5053
# subproject. Otherwise the install rules in this project break.
5154
set(ABSL_ENABLE_INSTALL ON)
5255
set(ABSL_BUILD_TESTING OFF)
53-
set(ABSL_BUILD_TEST_HELPERS OFF)
54-
set(ABSL_USE_EXTERNAL_GOOGLETEST ON)
55-
set(ABSL_FIND_GOOGLETEST OFF)
5656
FetchContent_MakeAvailable(absl)
5757
list(POP_BACK CMAKE_MESSAGE_INDENT)
5858
message(CHECK_PASS "fetched")
5959
endif()
6060

61-
# ##############################################################################
62-
# RE2
63-
# ##############################################################################
64-
if(BUILD_re2)
65-
message(CHECK_START "Fetching re2")
66-
list(APPEND CMAKE_MESSAGE_INDENT " ")
67-
FetchContent_Declare(
68-
re2
69-
GIT_REPOSITORY "https://github.com/google/re2.git"
70-
GIT_TAG "2025-08-12"
71-
GIT_SHALLOW TRUE
72-
UPDATE_COMMAND git reset --hard
73-
PATCH_COMMAND git apply --ignore-whitespace
74-
"${CMAKE_CURRENT_LIST_DIR}/../../patches/re2-2025-08-12.patch"
75-
)
76-
set(RE2_BUILD_TESTING OFF)
77-
FetchContent_MakeAvailable(re2)
78-
list(POP_BACK CMAKE_MESSAGE_INDENT)
79-
message(CHECK_PASS "fetched")
80-
endif()
81-
8261
# ##############################################################################
8362
# Protobuf
8463
# ##############################################################################
@@ -88,12 +67,13 @@ if(BUILD_Protobuf)
8867
FetchContent_Declare(
8968
Protobuf
9069
GIT_REPOSITORY "https://github.com/protocolbuffers/protobuf.git"
91-
GIT_TAG "v33.0"
70+
GIT_TAG "v33.1"
9271
GIT_SHALLOW TRUE
9372
GIT_SUBMODULES ""
9473
UPDATE_COMMAND git reset --hard
9574
PATCH_COMMAND git apply --ignore-whitespace
96-
"${CMAKE_CURRENT_LIST_DIR}/../../patches/protobuf-v33.0.patch"
75+
"${CMAKE_CURRENT_LIST_DIR}/../../patches/protobuf-v33.1.patch"
76+
OVERRIDE_FIND_PACKAGE # Make package visible for "protobuf-matchers" below
9777
)
9878
set(protobuf_BUILD_TESTS OFF)
9979
set(protobuf_BUILD_SHARED_LIBS ON)
@@ -105,6 +85,28 @@ if(BUILD_Protobuf)
10585
message(CHECK_PASS "fetched")
10686
endif()
10787

88+
# ##############################################################################
89+
# RE2
90+
# ##############################################################################
91+
if(BUILD_re2)
92+
message(CHECK_START "Fetching re2")
93+
list(APPEND CMAKE_MESSAGE_INDENT " ")
94+
FetchContent_Declare(
95+
re2
96+
GIT_REPOSITORY "https://github.com/google/re2.git"
97+
GIT_TAG "2025-08-12"
98+
GIT_SHALLOW TRUE
99+
UPDATE_COMMAND git reset --hard
100+
PATCH_COMMAND git apply --ignore-whitespace
101+
"${CMAKE_CURRENT_LIST_DIR}/../../patches/re2-2025-08-12.patch"
102+
)
103+
set(RE2_BUILD_TESTING OFF)
104+
FetchContent_MakeAvailable(re2)
105+
list(POP_BACK CMAKE_MESSAGE_INDENT)
106+
message(CHECK_PASS "fetched")
107+
endif()
108+
109+
108110
###############
109111
## TESTING ##
110112
###############

cmake/host.CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ list(APPEND CMAKE_MESSAGE_INDENT " ")
108108
FetchContent_Declare(
109109
protobuf
110110
GIT_REPOSITORY "https://github.com/protocolbuffers/protobuf.git"
111-
GIT_TAG "v33.0"
111+
GIT_TAG "v33.1"
112112
GIT_SHALLOW TRUE
113113
GIT_SUBMODULES ""
114114
PATCH_COMMAND git apply --ignore-whitespace
115-
"${CMAKE_CURRENT_LIST_DIR}/@PATCHES_PATH@/protobuf-v33.0.patch"
115+
"${CMAKE_CURRENT_LIST_DIR}/@PATCHES_PATH@/protobuf-v33.1.patch"
116116
)
117117
set(protobuf_BUILD_TESTS OFF)
118118
set(protobuf_BUILD_SHARED_LIBS ON)

cmake/system_deps.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ if(NOT BUILD_absl AND NOT TARGET absl::base)
1717
find_package(absl REQUIRED)
1818
endif()
1919

20-
if(NOT BUILD_re2 AND NOT TARGET re2::re2)
21-
find_package(re2 REQUIRED)
22-
endif()
23-
2420
if(NOT BUILD_Protobuf AND NOT TARGET protobuf::libprotobuf)
2521
find_package(Protobuf REQUIRED)
2622
endif()
2723

24+
if(NOT BUILD_re2 AND NOT TARGET re2::re2)
25+
find_package(re2 REQUIRED)
26+
endif()
27+
2828
# CXX Test
2929
if(BUILD_TESTING)
3030
if(NOT BUILD_googletest AND NOT TARGET GTest::gtest_main)

0 commit comments

Comments
 (0)