-
Notifications
You must be signed in to change notification settings - Fork 7.2k
[google-cloud-cpp] Skip building mock libraries. #39802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I would add it to the |
|
Fixes #39789 |
[SC-50499](https://app.shortcut.com/tiledb-inc/story/50499/ci-s-updating-of-cmake-3-30-broke-building-the-gcs-port) GitHub Action's recent rollout of CMake 3.30 has broken building the `google-cloud-cpp` port, because it cannot find the `GTest::gmock_main` target (which is otherwise unused for the mainstream building scenario). This PR patches the port to remove the `target_link_libraries` command that links to GMock. Subsequent versions of the Google Cloud client library have added an official option to disable building the mock libraries, and microsoft/vcpkg#39802 has been opened to specify the option in the upstream port. --- TYPE: NO_HISTORY
|
I encountered the same issue as #39789 x64-linux, I can submit a bug report if you wish.
the additional targets are due to the fact that I build with a vcpkg like {
"dependencies" :[
"abseil",
{
"name" : "google-cloud-cpp",
"features" : [
"grpc-common",
"iam",
"iap",
"compute",
"kms",
"monitoring",
"logging",
"opentelemetry",
"pubsub",
"rest-common" ,
"speech",
"storage",
"storageinsights",
"storagetransfer",
"support",
"tasks",
"trace",
"translate"
]
}
]
}but it looks like the |
[SC-50499](https://app.shortcut.com/tiledb-inc/story/50499/ci-s-updating-of-cmake-3-30-broke-building-the-gcs-port) GitHub Action's recent rollout of CMake 3.30 has broken building the `google-cloud-cpp` port, because it cannot find the `GTest::gmock_main` target (which is otherwise unused for the mainstream building scenario). This PR patches the port to remove the `target_link_libraries` command that links to GMock. Subsequent versions of the Google Cloud client library have added an official option to disable building the mock libraries, and microsoft/vcpkg#39802 has been opened to specify the option in the upstream port. --- TYPE: NO_HISTORY (cherry picked from commit 4c76857)
|
as previously discussed, using cmake 3.30, to make this PR work, I had to also add an additional two lines patch file and then one more line in the |
[SC-50499](https://app.shortcut.com/tiledb-inc/story/50499/ci-s-updating-of-cmake-3-30-broke-building-the-gcs-port) GitHub Action's recent rollout of CMake 3.30 has broken building the `google-cloud-cpp` port, because it cannot find the `GTest::gmock_main` target (which is otherwise unused for the mainstream building scenario). This PR patches the port to remove the `target_link_libraries` command that links to GMock. Subsequent versions of the Google Cloud client library have added an official option to disable building the mock libraries, and microsoft/vcpkg#39802 has been opened to specify the option in the upstream port. --- TYPE: NO_HISTORY (cherry picked from commit 4c76857)
6d10668 to
db8f552
Compare
|
@teo-tsirpanis + @alichnewsky: Thanks for this fix. |
| - ON) | ||
| + $<IF:$<BOOL:${BUILD_TESTING}>:OFF:ON>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me think about this, and upstream the patch if it makes sense...
./vcpkg x-add-version --alland committing the result.This PR adds the
-DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFFintroduced in googleapis/google-cloud-cpp#13673, to fix errors in CMake 3.30 about targetGTest::gmock_mainnot being found.Validated locally. This is not a breaking change; the mock targets were already not installed because they belong in
COMPONENT google_cloud_cpp_development.