Skip to content

Commit e493db0

Browse files
committed
Add patch to remove linking to gmock.
1 parent a8b0b26 commit e493db0

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

ports/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ After copying the port, add an entry to the table below. You should also contrib
3636
| `azure-storage-common-cpp` | Patching to disable default features on libxml2 (https://github.com/Azure/azure-sdk-for-cpp/pull/5221). |
3737
| `libfaketime` | Port does not yet exist upstream |
3838
| `vcpkg-cmake-config` | Patching to fix build issues with CMake 3.29.1. (https://github.com/microsoft/vcpkg/pull/38017) |
39+
| `google-cloud-cpp` | Patching to remove dependency on GMock. (https://github.com/microsoft/vcpkg/pull/39802) |

ports/google-cloud-cpp/portfile.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ vcpkg_from_github(
88
HEAD_REF main
99
PATCHES
1010
support_absl_cxx17.patch
11+
remove_gmock.patch
1112
)
1213

1314
if ("grpc-common" IN_LIST FEATURES)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/google/cloud/google_cloud_cpp_common.cmake b/google/cloud/google_cloud_cpp_common.cmake
2+
index 1a14c77..4e8058e 100644
3+
--- a/google/cloud/google_cloud_cpp_common.cmake
4+
+++ b/google/cloud/google_cloud_cpp_common.cmake
5+
@@ -271,9 +271,6 @@ set(google_cloud_cpp_mocks_hdrs
6+
mocks/mock_stream_range.h)
7+
export_list_to_bazel("google_cloud_cpp_mocks.bzl" "google_cloud_cpp_mocks_hdrs"
8+
YEAR "2022")
9+
-target_link_libraries(
10+
- google_cloud_cpp_mocks INTERFACE google-cloud-cpp::common GTest::gmock_main
11+
- GTest::gmock GTest::gtest)
12+
set_target_properties(google_cloud_cpp_mocks PROPERTIES EXPORT_NAME
13+
google-cloud-cpp::mocks)
14+
target_include_directories(

0 commit comments

Comments
 (0)