Skip to content

Commit

Permalink
fix(oauth2): only enable via GOOGLE_CLOUD_CPP_ENABLE (#12911)
Browse files Browse the repository at this point in the history
Enabling `oauth2` if `GOOGLE_CLOUD_CPPP_ENABLE_REST` is set is a bug: it
introduces a cycle in the dependencies of the library, and makes it
impossible to compile `oauth2`, `storage`, and `compute` in different
shards.
  • Loading branch information
coryan committed Oct 17, 2023
1 parent fa4eeb6 commit 56fe3c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ the APIs in these libraries are stable, and are ready for production use.

- [Secure Source Manager](/google/cloud/securesourcemanager/README.md)

### Other Changes

- fix(oauth2): only enable via `GOOGLE_CLOUD_CPP_ENABLE`
([#12911](https://github.com/googleapis/google-cloud-cpp/pull/12911)) When
compiling with CMake, the `oauth2` used to be automatically enabled if
`GOOGLE_CLOUD_CPP_REST` was manually enabled or enabled by a separate library.
That made it impossible to shard a build with separate builds for `oauth2`,
`storage` and `compute`.

## v2.17.0 - 2023-10

### [Compute Engine](/google/cloud/compute/README.md)
Expand Down
3 changes: 0 additions & 3 deletions cmake/GoogleCloudCppFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,6 @@ macro (google_cloud_cpp_enable_cleanup)
OR (sql IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
OR (generator IN_LIST GOOGLE_CLOUD_CPP_ENABLE))
set(GOOGLE_CLOUD_CPP_ENABLE_REST ON)
# Backwards compatibility. In the original release of `oauth2` we
# automatically compiled the library if REST was enabled
list(APPEND GOOGLE_CLOUD_CPP_ENABLE oauth2)
endif ()

list(REMOVE_DUPLICATES GOOGLE_CLOUD_CPP_ENABLE)
Expand Down

0 comments on commit 56fe3c6

Please sign in to comment.