Skip to content

Commit

Permalink
GH-37510: [C++] Don't install bundled Azure SDK for C++ (#38176)
Browse files Browse the repository at this point in the history
### Rationale for this change

It's an internal bundled library. We should not install it as a part of Arrow.

### What changes are included in this PR?

Exclude all Azure SDK for C++ jobs including install jobs aren't executed by default. Building jobs are executed because they are required to build Arrow.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* Closes: #37510

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou committed Oct 11, 2023
1 parent ef02417 commit 7047e63
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ci/docker/ubuntu-20.04-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ RUN /arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin
# static Arrow to run Flight/Flight SQL tests
ENV absl_SOURCE=BUNDLED \
ARROW_ACERO=ON \
ARROW_AZURE=ON \
ARROW_AZURE=OFF \
ARROW_BUILD_STATIC=ON \
ARROW_BUILD_TESTS=ON \
ARROW_DEPENDENCY_SOURCE=SYSTEM \
Expand Down
15 changes: 15 additions & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5070,8 +5070,20 @@ endif()
# Azure SDK for C++

function(build_azure_sdk)
if(CMAKE_VERSION VERSION_LESS 3.22)
# We can't disable installing Azure SDK for C++ by
# "set_property(DIRECTORY ${azure_sdk_SOURCE_DIR} PROPERTY
# EXCLUDE_FROM_ALL TRUE)" with CMake 3.16.
#
# At least CMake 3.22 on Ubuntu 22.04 works. So we use 3.22
# here. We may be able to use more earlier version here.
message(FATAL_ERROR "Building Azure SDK for C++ requires at least CMake 3.22. "
"(At least we can't use CMake 3.16)")
endif()
message(STATUS "Building Azure SDK for C++ from source")
fetchcontent_declare(azure_sdk
# EXCLUDE_FROM_ALL is available since CMake 3.28
# EXCLUDE_FROM_ALL TRUE
URL ${ARROW_AZURE_SDK_URL}
URL_HASH "SHA256=${ARROW_AZURE_SDK_BUILD_SHA256_CHECKSUM}")
prepare_fetchcontent()
Expand All @@ -5084,6 +5096,9 @@ function(build_azure_sdk)
set(ENV{AZURE_SDK_DISABLE_AUTO_VCPKG} TRUE)
set(WARNINGS_AS_ERRORS FALSE)
fetchcontent_makeavailable(azure_sdk)
if(CMAKE_VERSION VERSION_LESS 3.28)
set_property(DIRECTORY ${azure_sdk_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL TRUE)
endif()
set(AZURE_SDK_VENDORED
TRUE
PARENT_SCOPE)
Expand Down

0 comments on commit 7047e63

Please sign in to comment.