This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new f4b7a4ee0a GH-45930: [C++] Don't use ICU C++ API in Azure SDK C++ 
(#45952)
f4b7a4ee0a is described below

commit f4b7a4ee0a52777f4a696ad3c8d6f62f48cb4867
Author: Sutou Kouhei <[email protected]>
AuthorDate: Fri Mar 28 06:12:11 2025 +0900

    GH-45930: [C++] Don't use ICU C++ API in Azure SDK C++ (#45952)
    
    ### Rationale for this change
    
    ICU 75.1 or later requires C++17 but Azure SDK for C++ still uses C++14. 
Azure SDK for C++ includes ICU headers via libxml2.
    
    ### What changes are included in this PR?
    
    We don't need to use ICU C++ API. So we can disable ICU C++ API.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    Yes.
    * GitHub Issue: #45930
    
    Lead-authored-by: Sutou Kouhei <[email protected]>
    Co-authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bf843649b5..1259b9453a 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -5510,6 +5510,12 @@ function(build_azure_sdk)
   set(BUILD_SAMPLES FALSE)
   set(BUILD_TESTING FALSE)
   set(BUILD_WINDOWS_UWP TRUE)
+  # ICU 75.1 or later requires C++17 but Azure SDK for C++ still uses
+  # C++14. So we disable C++ API in ICU.
+  #
+  # We can remove this after
+  # https://github.com/Azure/azure-sdk-for-cpp/pull/6486 is merged.
+  string(APPEND CMAKE_CXX_FLAGS " -DU_SHOW_CPLUSPLUS_API=0")
   set(CMAKE_UNITY_BUILD FALSE)
   set(DISABLE_AZURE_CORE_OPENTELEMETRY TRUE)
   set(ENV{AZURE_SDK_DISABLE_AUTO_VCPKG} TRUE)

Reply via email to