From 3e0df2a30310184b04816a199cf8c276b460c411 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 11 Oct 2023 11:54:10 +0900 Subject: [PATCH] Reject CMake 3.16 --- ci/docker/ubuntu-20.04-cpp.dockerfile | 2 +- cpp/cmake_modules/ThirdpartyToolchain.cmake | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ci/docker/ubuntu-20.04-cpp.dockerfile b/ci/docker/ubuntu-20.04-cpp.dockerfile index 1e0a1e4807402..3e3b7ac3a6d99 100644 --- a/ci/docker/ubuntu-20.04-cpp.dockerfile +++ b/ci/docker/ubuntu-20.04-cpp.dockerfile @@ -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 \ diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index d210393782622..35403e6a7b8cf 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -5070,6 +5070,16 @@ 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