Skip to content

Commit 4ed878d

Browse files
committed
cmake: bump dependencies
* abseil-cpp 20250512.0 * protobuf v31.0 * re2 2024-07-02 * googletest 1.17.0 * benchmark 1.9.2 devNote: to fix a patch not working ```sh cd ~/.../ortools_repo cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_EXAMPLES=OFF -DBUILD_SAMPLES=OFF -DBUILD_TESTING=ON pushd build/_deps/absl-src git apply --3way ~/.../ortools_repo/patches/abseil-cpp-20250512.0.patch git mergetool git diff HEAD -u > ~/.../ortools_repo/patches/abseil-cpp-20250512.0.patch cd .. rm -rf absl-* popd <repeat> ```
1 parent 5d5bfda commit 4ed878d

6 files changed

Lines changed: 30 additions & 109 deletions

File tree

cmake/dependencies/CMakeLists.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ if(BUILD_absl)
111111
FetchContent_Declare(
112112
absl
113113
GIT_REPOSITORY "https://github.com/abseil/abseil-cpp.git"
114-
GIT_TAG "20250127.1"
114+
GIT_TAG "20250512.0"
115115
GIT_SHALLOW TRUE
116116
PATCH_COMMAND git apply --ignore-whitespace
117-
"${CMAKE_CURRENT_LIST_DIR}/../../patches/abseil-cpp-20250127.1.patch"
117+
"${CMAKE_CURRENT_LIST_DIR}/../../patches/abseil-cpp-20250512.0.patch"
118118
OVERRIDE_FIND_PACKAGE
119119
)
120120
FetchContent_MakeAvailable(absl)
@@ -136,10 +136,11 @@ if(BUILD_Protobuf)
136136
FetchContent_Declare(
137137
Protobuf
138138
GIT_REPOSITORY "https://github.com/protocolbuffers/protobuf.git"
139-
GIT_TAG "v30.2"
139+
GIT_TAG "v31.0"
140140
GIT_SHALLOW TRUE
141141
GIT_SUBMODULES ""
142-
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/protobuf-v30.2.patch"
142+
PATCH_COMMAND git apply --ignore-whitespace
143+
"${CMAKE_CURRENT_LIST_DIR}/../../patches/protobuf-v31.0.patch"
143144
)
144145
FetchContent_MakeAvailable(Protobuf)
145146
list(POP_BACK CMAKE_MESSAGE_INDENT)
@@ -156,9 +157,9 @@ if(BUILD_re2)
156157
FetchContent_Declare(
157158
re2
158159
GIT_REPOSITORY "https://github.com/google/re2.git"
159-
GIT_TAG "2024-04-01"
160+
GIT_TAG "2024-07-02"
160161
GIT_SHALLOW TRUE
161-
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/re2-2024-04-01.patch"
162+
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/re2-2024-07-02.patch"
162163
)
163164
FetchContent_MakeAvailable(re2)
164165
list(POP_BACK CMAKE_MESSAGE_INDENT)
@@ -491,11 +492,10 @@ if(BUILD_googletest)
491492
FetchContent_Declare(
492493
googletest
493494
GIT_REPOSITORY https://github.com/google/googletest.git
494-
GIT_TAG v1.16.0
495+
GIT_TAG v1.17.0
495496
GIT_SHALLOW TRUE
496497
PATCH_COMMAND git apply --ignore-whitespace
497-
"${CMAKE_CURRENT_LIST_DIR}/../../patches/googletest-v1.16.0.patch"
498-
#PATCH_COMMAND git apply --ignore-whitespace ""
498+
"${CMAKE_CURRENT_LIST_DIR}/../../patches/googletest-v1.17.0.patch"
499499
)
500500
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
501501
set(INSTALL_GTEST OFF)
@@ -511,7 +511,7 @@ if(BUILD_benchmark)
511511
FetchContent_Declare(
512512
benchmark
513513
GIT_REPOSITORY https://github.com/google/benchmark.git
514-
GIT_TAG v1.9.1
514+
GIT_TAG v1.9.2
515515
GIT_SHALLOW TRUE
516516
#PATCH_COMMAND git apply --ignore-whitespace ""
517517
)

patches/abseil-cpp-20250127.1.patch

Lines changed: 0 additions & 99 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/absl/flags/declare.h b/absl/flags/declare.h
2+
index 8d2a856..a154046 100644
3+
--- a/absl/flags/declare.h
4+
+++ b/absl/flags/declare.h
5+
@@ -59,10 +59,15 @@ ABSL_NAMESPACE_END
6+
7+
// Internal implementation of ABSL_DECLARE_FLAG to allow macro expansion of its
8+
// arguments. Clients must use ABSL_DECLARE_FLAG instead.
9+
+#if defined(_MSC_VER)
10+
+#define ABSL_DECLARE_FLAG_INTERNAL(type, name) \
11+
+ extern absl::Flag<type> FLAGS_##name
12+
+#else
13+
#define ABSL_DECLARE_FLAG_INTERNAL(type, name) \
14+
extern absl::Flag<type> FLAGS_##name; \
15+
namespace absl /* block flags in namespaces */ {} \
16+
/* second redeclaration is to allow applying attributes */ \
17+
extern absl::Flag<type> FLAGS_##name
18+
+#endif // _MSC_VER
19+
20+
#endif // ABSL_FLAGS_DECLARE_H_

0 commit comments

Comments
 (0)