Skip to content

Commit

Permalink
Support cmake 3.30
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
  • Loading branch information
timkpaine committed Jul 22, 2024
1 parent fae9092 commit d6d81c6
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-deps/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ runs:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.29.6"
cmake-version: "3.30.0"

- name: Install pnpm
uses: pnpm/action-setup@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
push:
branches:
- master
- tkp/cmake30
tags:
- v*
paths-ignore:
Expand Down
24 changes: 24 additions & 0 deletions cmake/patches/0001-fix-absl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From cc84e46a15ddd33fd77a5bc9d3c6a9c3c6ab4080 Mon Sep 17 00:00:00 2001
From: Tim Paine <3105306+timkpaine@users.noreply.github.com>
Date: Mon, 15 Jul 2024 22:01:28 -0400
Subject: [PATCH] .

---
third_party/abseil-cpp/absl/container/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/third_party/abseil-cpp/absl/container/CMakeLists.txt b/third_party/abseil-cpp/absl/container/CMakeLists.txt
index 128cc0e9..11d65d55 100644
--- a/third_party/abseil-cpp/absl/container/CMakeLists.txt
+++ b/third_party/abseil-cpp/absl/container/CMakeLists.txt
@@ -213,6 +213,7 @@ absl_cc_library(
DEPS
absl::config
GTest::gmock
+ TESTONLY
)

absl_cc_test(
--
2.44.0

1 change: 1 addition & 0 deletions cmake/protobuf.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ExternalProject_Add(protobuf
SOURCE_DIR "${CMAKE_BINARY_DIR}/protobuf-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/protobuf-build"
CONFIGURE_COMMAND ""
PATCH_COMMAND git apply ${PSP_CMAKE_MODULE_PATH}/patches/0001-fix-absl.patch
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
Expand Down
3 changes: 2 additions & 1 deletion cpp/protos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if(NOT DEFINED PSP_CMAKE_MODULE_PATH)
message(STATUS "PSP_CMAKE_MODULE_PATH not defined, using ${PSP_CMAKE_MODULE_PATH}")
endif()

set(protobuf_BUILD_TESTS OFF)
psp_build_dep("protobuf" "${PSP_CMAKE_MODULE_PATH}/protobuf.txt.in")

set(PROTO_FILES perspective.proto)
Expand All @@ -31,4 +32,4 @@ protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${PROTO_FILES})
add_library(protos STATIC ${PROTO_SRCS} ${PROTO_HDRS})
target_include_directories(protos PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/protobuf-src/src)
target_include_directories(protos PUBLIC ${CMAKE_BINARY_DIR}/protos-build)
target_link_libraries(protos protobuf::libprotobuf)
target_link_libraries(protos protobuf::libprotobuf)
2 changes: 1 addition & 1 deletion rust/perspective-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ path = "src/rust/lib.rs"

[build-dependencies]
prost-build = { version = "0.12.3" }
protobuf-src = { version = "2.0.1", optional = true }
protobuf-src = { version = "2.1.0+27.1", optional = true }

[dependencies]
async-lock = { version = "2.5.0" }
Expand Down

0 comments on commit d6d81c6

Please sign in to comment.