Skip to content

Commit 6ae867d

Browse files
authored
Patch abseil-cpp to ignore deprecated errors in new Xcode. (#12498)
1 parent 48a77e3 commit 6ae867d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

cmake/external/abseil-cpp.cmake

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
include(ExternalProject)
1616

17+
# Note: When updating to 20230802.0 or later, remove the PATCH_COMMAND below.
1718
set(version 20220623.0)
1819

1920
ExternalProject_Add(
@@ -31,4 +32,6 @@ ExternalProject_Add(
3132
INSTALL_COMMAND ""
3233
TEST_COMMAND ""
3334
HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}"
35+
36+
PATCH_COMMAND patch -Np1 -i ${CMAKE_CURRENT_LIST_DIR}/abseil-cpp.patch.txt
3437
)

cmake/external/abseil-cpp.patch.txt

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/absl/meta/type_traits.h b/absl/meta/type_traits.h
2+
index d886cb30..c2a2d15e 100644
3+
--- a/absl/meta/type_traits.h
4+
+++ b/absl/meta/type_traits.h
5+
@@ -35,6 +35,12 @@
6+
#ifndef ABSL_META_TYPE_TRAITS_H_
7+
#define ABSL_META_TYPE_TRAITS_H_
8+
9+
+// Added by firebase-ios-sdk/cmake/external/abseil-cpp.patch.txt
10+
+#if __clang__
11+
+#pragma clang diagnostic push
12+
+#pragma clang diagnostic ignored "-Wdeprecated"
13+
+#endif // __clang__
14+
+
15+
#include <cstddef>
16+
#include <functional>
17+
#include <type_traits>
18+
@@ -794,4 +800,9 @@ using swap_internal::StdSwapIsUnconstrained;
19+
ABSL_NAMESPACE_END
20+
} // namespace absl
21+
22+
+// Added by firebase-ios-sdk/cmake/external/abseil-cpp.patch.txt
23+
+#if __clang__
24+
+#pragma clang diagnostic pop
25+
+#endif // __clang__
26+
+
27+
#endif // ABSL_META_TYPE_TRAITS_H_

0 commit comments

Comments
 (0)