Skip to content

Commit

Permalink
apacheGH-36944: [C++] Unify OpenSSL detection for building GCS (apach…
Browse files Browse the repository at this point in the history
…e#36945)

### Rationale for this change

`build_google_cloud_cpp_storage()` calls `resolve_dependency(OpenSSL)` but it should not be here. We should have only one `resolve_dependency(OpenSSL)` for easy to maintain.

### What changes are included in this PR?

Don't call `resolve_dependency(OpenSSL)` from `build_google_cloud_cpp_storage()`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#36944

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou authored and R-JunmingChen committed Aug 20, 2023
1 parent fb7a541 commit 3241def
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1368,8 +1368,9 @@ set(ARROW_OPENSSL_REQUIRED_VERSION "1.0.2")
set(ARROW_USE_OPENSSL OFF)
if(PARQUET_REQUIRE_ENCRYPTION
OR ARROW_FLIGHT
OR ARROW_S3
OR ARROW_GANDIVA)
OR ARROW_GANDIVA
OR ARROW_GCS
OR ARROW_S3)
set(OpenSSL_SOURCE "SYSTEM")
resolve_dependency(OpenSSL
HAVE_ALT
Expand Down Expand Up @@ -4106,10 +4107,6 @@ macro(build_google_cloud_cpp_storage)
# Curl is required on all platforms, but building it internally might also trip over S3's copy.
# For now, force its inclusion from the underlying system or fail.
find_curl()
if(NOT OpenSSL_FOUND)
resolve_dependency(OpenSSL HAVE_ALT REQUIRED_VERSION
${ARROW_OPENSSL_REQUIRED_VERSION})
endif()

# Build google-cloud-cpp, with only storage_client

Expand Down

0 comments on commit 3241def

Please sign in to comment.