mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 03:10:57 +08:00
[google-cloud-cpp] Skip building mock libraries. (#39802)
This commit is contained in:
parent
1b5f734661
commit
3389f5011d
22
ports/google-cloud-cpp/fix_mocks_dependent_option.patch
Normal file
22
ports/google-cloud-cpp/fix_mocks_dependent_option.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e1a1dc8..807f6e2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -173,7 +173,7 @@ provided mocks to test code involving the Cloud C++ clients may wish to turn
|
||||
this flag off.]==]
|
||||
ON
|
||||
"NOT BUILD_TESTING"
|
||||
- ON)
|
||||
+ $<IF:$<BOOL:${BUILD_TESTING}>:OFF:ON>)
|
||||
mark_as_advanced(GOOGLE_CLOUD_CPP_WITH_MOCKS)
|
||||
|
||||
# The examples use exception handling to simplify the code. Therefore they
|
||||
@@ -246,7 +246,7 @@ include(CTest)
|
||||
# used in the depends condition of the next option.
|
||||
include(EnableCxxExceptions)
|
||||
|
||||
-if (BUILD_TESTING)
|
||||
+if (BUILD_TESTING OR GOOGLE_CLOUD_CPP_WITH_MOCKS)
|
||||
# Discover and add targets for the GTest::gtest and GTest::gmock libraries.
|
||||
include(FindGMockWithTargets)
|
||||
endif ()
|
@ -8,6 +8,7 @@ vcpkg_from_github(
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
support_absl_cxx17.patch
|
||||
fix_mocks_dependent_option.patch
|
||||
)
|
||||
|
||||
if ("grpc-common" IN_LIST FEATURES)
|
||||
@ -48,6 +49,7 @@ vcpkg_cmake_configure(
|
||||
-DGOOGLE_CLOUD_CPP_ENABLE_CCACHE=OFF
|
||||
-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "google-cloud-cpp",
|
||||
"version": "2.26.0",
|
||||
"port-version": 1,
|
||||
"description": "C++ Client Libraries for Google Cloud Platform APIs.",
|
||||
"homepage": "https://github.com/googleapis/google-cloud-cpp",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -3154,7 +3154,7 @@
|
||||
},
|
||||
"google-cloud-cpp": {
|
||||
"baseline": "2.26.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"google-cloud-cpp-common": {
|
||||
"baseline": "alias",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "79809a3d4f368d9afe5eac6f10d892311b464e00",
|
||||
"version": "2.26.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "6f92046f144ea5804abafe724ea2fec115dad148",
|
||||
"version": "2.26.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user