Skip to content

Commit b39d089

Browse files
committed
Add abseil-cpp patch for CPM
1 parent 28e8dc2 commit b39d089

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

cmake/SetupAbseil.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ cpmaddpackage(
3333
SYSTEM
3434
PATCHES
3535
abseil_pr_1707.patch
36+
abseil_pr_1739.patch
3637
OPTIONS
3738
"ABSL_PROPAGATE_CXX_STD ON"
3839
"ABSL_ENABLE_INSTALL ON"

cmake/abseil_pr_1739.patch

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From faf1b03a591f06933da02976119da5743f428e4f Mon Sep 17 00:00:00 2001
2+
From: Christopher Fore <csfore@posteo.net>
3+
Date: Mon, 5 Aug 2024 10:48:19 -0400
4+
Subject: [PATCH] container/internal: Explicitly include <cstdint>
5+
MIME-Version: 1.0
6+
Content-Type: text/plain; charset=UTF-8
7+
Content-Transfer-Encoding: 8bit
8+
9+
GCC 15 will no longer include <cstdint> by default, resulting in build
10+
failures in projects that do not explicitly include it.
11+
12+
Error:
13+
absl/container/internal/container_memory.h:66:27: error: ‘uintptr_t’ does not name a type
14+
66 | assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
15+
| ^~~~~~~~~
16+
absl/container/internal/container_memory.h:31:1: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
17+
30 | #include "absl/utility/utility.h"
18+
+++ |+#include <cstdint>
19+
31 |
20+
21+
See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
22+
Signed-off-by: Christopher Fore <csfore@posteo.net>
23+
---
24+
absl/container/internal/container_memory.h | 1 +
25+
1 file changed, 1 insertion(+)
26+
27+
diff --git a/absl/container/internal/container_memory.h b/absl/container/internal/container_memory.h
28+
index ba8e08a2d22..e7031797018 100644
29+
--- a/absl/container/internal/container_memory.h
30+
+++ b/absl/container/internal/container_memory.h
31+
@@ -17,6 +17,7 @@
32+
33+
#include <cassert>
34+
#include <cstddef>
35+
+#include <cstdint>
36+
#include <cstring>
37+
#include <memory>
38+
#include <new>

0 commit comments

Comments
 (0)