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 6d6f2468c2 GH-49974: [C++][CMake] Add missing result variable 
initialization for `validate_apple_libtool()` (#49975)
6d6f2468c2 is described below

commit 6d6f2468c22faad8418797279716de692b26701b
Author: Sutou Kouhei <[email protected]>
AuthorDate: Fri May 15 09:18:01 2026 +0900

    GH-49974: [C++][CMake] Add missing result variable initialization for 
`validate_apple_libtool()` (#49975)
    
    ### Rationale for this change
    
    `find_package()`'s `VALIDATOR`'s result variable must be initialized to 
`TRUE` by caller.
    
    We reuse the `VALIDATOR` (`validate_apple_libtool()`) when we specify 
`CMAKE_LIBTOOL` explicitly. But we didn't initialize the result variable to 
`TRUE`.
    
    ### What changes are included in this PR?
    
    Initialize `is_apple_libtool` explicitly.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    Yes.
    
    * GitHub Issue: #49974
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 cpp/cmake_modules/BuildUtils.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpp/cmake_modules/BuildUtils.cmake 
b/cpp/cmake_modules/BuildUtils.cmake
index d9e06b1657..8556273a0d 100644
--- a/cpp/cmake_modules/BuildUtils.cmake
+++ b/cpp/cmake_modules/BuildUtils.cmake
@@ -117,6 +117,7 @@ function(arrow_create_merged_static_lib output_target)
     if(CMAKE_LIBTOOL)
       set(LIBTOOL_MACOS ${CMAKE_LIBTOOL})
       # Validate that CMAKE_LIBTOOL is Apple's libtool
+      set(is_apple_libtool TRUE)
       validate_apple_libtool(is_apple_libtool "${LIBTOOL_MACOS}")
       if(NOT is_apple_libtool)
         get_libtool_version("${LIBTOOL_MACOS}" _libtool_version_output)

Reply via email to