Skip to content

Commit

Permalink
deps: Bump abseil-cpp to 20230802.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Aug 10, 2023
1 parent 0693558 commit 9996940
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 165 deletions.
2 changes: 1 addition & 1 deletion Dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Protobuf=v23.4
abseil-cpp=20230125.3
abseil-cpp=20230802.0
Cbc=2.10.7
Cgl=0.60.5
Clp=1.17.7
Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ git_repository(
## Abseil-cpp
git_repository(
name = "com_google_absl",
tag = "20230125.3",
patches = ["//patches:abseil-cpp-20230125.3.patch"],
tag = "20230802.0",
patches = ["//patches:abseil-cpp-20230802.0.patch"],
patch_args = ["-p1"],
remote = "https://github.com/abseil/abseil-cpp.git",
)
Expand Down
4 changes: 2 additions & 2 deletions cmake/dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ if(BUILD_absl)
FetchContent_Declare(
absl
GIT_REPOSITORY "https://github.com/abseil/abseil-cpp.git"
GIT_TAG "20230125.3"
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/abseil-cpp-20230125.3.patch"
GIT_TAG "20230802.0"
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/abseil-cpp-20230802.0.patch"
)
FetchContent_MakeAvailable(absl)
list(POP_BACK CMAKE_MESSAGE_INDENT)
Expand Down
4 changes: 2 additions & 2 deletions cmake/host.CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ set(ABSL_PROPAGATE_CXX_STD ON)
FetchContent_Declare(
absl
GIT_REPOSITORY "https://github.com/abseil/abseil-cpp.git"
GIT_TAG "20230125.3"
PATCH_COMMAND git apply "${CMAKE_CURRENT_LIST_DIR}/../../../patches/abseil-cpp-20230125.3.patch")
GIT_TAG "20230802.0"
PATCH_COMMAND git apply "${CMAKE_CURRENT_LIST_DIR}/../../../patches/abseil-cpp-20230802.0.patch")
FetchContent_MakeAvailable(absl)
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "fetched")
Expand Down
2 changes: 2 additions & 0 deletions patches/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# limitations under the License.

exports_files([
"abseil-cpp-20230802.0.patch",
"protobuf-v23.4.patch",
"pybind11.patch",
"pybind11_bazel.patch",
"pybind11_protobuf.patch",
])
158 changes: 0 additions & 158 deletions patches/abseil-cpp-20230125.3.patch

This file was deleted.

49 changes: 49 additions & 0 deletions patches/abseil-cpp-20230802.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake
index f0d984ae..9134696d 100644
--- a/CMake/AbseilDll.cmake
+++ b/CMake/AbseilDll.cmake
@@ -624,23 +624,33 @@ set(ABSL_INTERNAL_TEST_DLL_TARGETS

include(CheckCXXSourceCompiles)

-check_cxx_source_compiles(
- [==[
-#ifdef _MSC_VER
-# if _MSVC_LANG < 201700L
-# error "The compiler defaults or is configured for C++ < 17"
-# endif
-#elif __cplusplus < 201700L
-# 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 < 201700L
+ # error "The compiler defaults or is configured for C++ < 17"
+ # endif
+ #elif __cplusplus < 201700L
+ # error "The compiler defaults or is configured for C++ < 17"
+ #endif
+ int main() { return 0; }
+ ]==]
ABSL_INTERNAL_AT_LEAST_CXX17)
+endif()

if(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)

0 comments on commit 9996940

Please sign in to comment.