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> ```
This commit is contained in:
committed by
Mizux Seiha
parent
7fc67a4468
commit
9cbf09afdf
@@ -1,99 +0,0 @@
|
||||
diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake
|
||||
index 32cc28f..e51d6df 100644
|
||||
--- a/CMake/AbseilDll.cmake
|
||||
+++ b/CMake/AbseilDll.cmake
|
||||
@@ -699,31 +699,44 @@ set(ABSL_INTERNAL_TEST_DLL_TARGETS
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
-check_cxx_source_compiles(
|
||||
- [==[
|
||||
-#ifdef _MSC_VER
|
||||
-# if _MSVC_LANG < 201703L
|
||||
-# error "The compiler defaults or is configured for C++ < 17"
|
||||
-# endif
|
||||
-#elif __cplusplus < 201703L
|
||||
-# error "The compiler defaults or is configured for C++ < 17"
|
||||
-#endif
|
||||
-int main() { return 0; }
|
||||
-]==]
|
||||
+message(WARNING "ABSL_CXX_STANDARD: ${ABSL_CXX_STANDARD}")
|
||||
+message(WARNING "CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD}")
|
||||
+message(WARNING "CMAKE_CXX_STANDARD_REQUIRED: ${CMAKE_CXX_STANDARD_REQUIRED}")
|
||||
+message(WARNING "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
|
||||
+
|
||||
+if(CMAKE_CXX_STANDARD GREATER_EQUAL 17)
|
||||
+ set(ABSL_INTERNAL_AT_LEAST_CXX17 TRUE)
|
||||
+else()
|
||||
+ check_cxx_source_compiles(
|
||||
+ [==[
|
||||
+ #ifdef _MSC_VER
|
||||
+ # if _MSVC_LANG < 201703L
|
||||
+ # error "The compiler defaults or is configured for C++ < 17"
|
||||
+ # endif
|
||||
+ #elif __cplusplus < 201703L
|
||||
+ # error "The compiler defaults or is configured for C++ < 17"
|
||||
+ #endif
|
||||
+ int main() { return 0; }
|
||||
+ ]==]
|
||||
ABSL_INTERNAL_AT_LEAST_CXX17)
|
||||
+endif()
|
||||
|
||||
-check_cxx_source_compiles(
|
||||
- [==[
|
||||
-#ifdef _MSC_VER
|
||||
-# if _MSVC_LANG < 202002L
|
||||
-# error "The compiler defaults or is configured for C++ < 20"
|
||||
-# endif
|
||||
-#elif __cplusplus < 202002L
|
||||
-# error "The compiler defaults or is configured for C++ < 20"
|
||||
-#endif
|
||||
-int main() { return 0; }
|
||||
-]==]
|
||||
+if(CMAKE_CXX_STANDARD GREATER_EQUAL 20)
|
||||
+ set(ABSL_INTERNAL_AT_LEAST_CXX20 TRUE)
|
||||
+else()
|
||||
+ check_cxx_source_compiles(
|
||||
+ [==[
|
||||
+ #ifdef _MSC_VER
|
||||
+ # if _MSVC_LANG < 202002L
|
||||
+ # error "The compiler defaults or is configured for C++ < 20"
|
||||
+ # endif
|
||||
+ #elif __cplusplus < 202002L
|
||||
+ # error "The compiler defaults or is configured for C++ < 20"
|
||||
+ #endif
|
||||
+ int main() { return 0; }
|
||||
+ ]==]
|
||||
ABSL_INTERNAL_AT_LEAST_CXX20)
|
||||
+endif()
|
||||
|
||||
if(ABSL_INTERNAL_AT_LEAST_CXX20)
|
||||
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_20)
|
||||
@@ -731,6 +744,7 @@ elseif(ABSL_INTERNAL_AT_LEAST_CXX17)
|
||||
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_17)
|
||||
else()
|
||||
set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_14)
|
||||
+ message(FATAL_ERROR "Should not pass here !!!")
|
||||
endif()
|
||||
|
||||
function(absl_internal_dll_contains)
|
||||
diff --git a/absl/flags/declare.h b/absl/flags/declare.h
|
||||
index 8d2a856..a154046 100644
|
||||
--- a/absl/flags/declare.h
|
||||
+++ b/absl/flags/declare.h
|
||||
@@ -59,10 +59,15 @@ ABSL_NAMESPACE_END
|
||||
|
||||
// Internal implementation of ABSL_DECLARE_FLAG to allow macro expansion of its
|
||||
// arguments. Clients must use ABSL_DECLARE_FLAG instead.
|
||||
+#if defined(_MSC_VER)
|
||||
+#define ABSL_DECLARE_FLAG_INTERNAL(type, name) \
|
||||
+ extern absl::Flag<type> FLAGS_##name
|
||||
+#else
|
||||
#define ABSL_DECLARE_FLAG_INTERNAL(type, name) \
|
||||
extern absl::Flag<type> FLAGS_##name; \
|
||||
namespace absl /* block flags in namespaces */ {} \
|
||||
/* second redeclaration is to allow applying attributes */ \
|
||||
extern absl::Flag<type> FLAGS_##name
|
||||
+#endif // _MSC_VER
|
||||
|
||||
#endif // ABSL_FLAGS_DECLARE_H_
|
||||
20
patches/abseil-cpp-20250512.0.patch
Normal file
20
patches/abseil-cpp-20250512.0.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
diff --git a/absl/flags/declare.h b/absl/flags/declare.h
|
||||
index 8d2a856..a154046 100644
|
||||
--- a/absl/flags/declare.h
|
||||
+++ b/absl/flags/declare.h
|
||||
@@ -59,10 +59,15 @@ ABSL_NAMESPACE_END
|
||||
|
||||
// Internal implementation of ABSL_DECLARE_FLAG to allow macro expansion of its
|
||||
// arguments. Clients must use ABSL_DECLARE_FLAG instead.
|
||||
+#if defined(_MSC_VER)
|
||||
+#define ABSL_DECLARE_FLAG_INTERNAL(type, name) \
|
||||
+ extern absl::Flag<type> FLAGS_##name
|
||||
+#else
|
||||
#define ABSL_DECLARE_FLAG_INTERNAL(type, name) \
|
||||
extern absl::Flag<type> FLAGS_##name; \
|
||||
namespace absl /* block flags in namespaces */ {} \
|
||||
/* second redeclaration is to allow applying attributes */ \
|
||||
extern absl::Flag<type> FLAGS_##name
|
||||
+#endif // _MSC_VER
|
||||
|
||||
#endif // ABSL_FLAGS_DECLARE_H_
|
||||
@@ -20,15 +20,15 @@ index 1f4f08d..cc4d0ba 100644
|
||||
|
||||
set(absl_URL https://github.com/abseil/abseil-cpp.git)
|
||||
-set(absl_TAG 20240116.0)
|
||||
+set(absl_TAG 20250127.1)
|
||||
+set(absl_TAG 20250512.0)
|
||||
|
||||
set(re2_URL https://github.com/google/re2.git)
|
||||
-set(re2_TAG 2024-02-01)
|
||||
+set(re2_TAG 2024-04-01)
|
||||
+set(re2_TAG 2024-07-02)
|
||||
|
||||
set(gtest_URL https://github.com/google/googletest.git)
|
||||
-set(gtest_TAG v1.14.0)
|
||||
+set(gtest_TAG v1.16.0)
|
||||
+set(gtest_TAG v1.17.0)
|
||||
|
||||
# From https://www.antlr.org/download.html
|
||||
set(antlr_cpp_URL https://www.antlr.org/download/antlr4-cpp-runtime-4.12.0-source.zip)
|
||||
@@ -36,7 +36,7 @@ index 1f4f08d..cc4d0ba 100644
|
||||
|
||||
set(proto_URL https://github.com/protocolbuffers/protobuf.git)
|
||||
-set(proto_TAG v28.2)
|
||||
+set(proto_TAG v30.2)
|
||||
+set(proto_TAG v31.0)
|
||||
|
||||
set(nlohmann_json_URL https://github.com/nlohmann/json.git)
|
||||
set(nlohmann_json_TAG v3.11.2)
|
||||
|
||||
Reference in New Issue
Block a user