kou commented on PR #34149:
URL: https://github.com/apache/arrow/pull/34149#issuecomment-1427128990

   @assignUser OK. How about sending a patch like the following to upstream 
then?
   
   ```diff
   diff --git a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake 
b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
   index 0265349f..c4be65ce 100644
   --- a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
   +++ b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
   @@ -1,6 +1,15 @@
    include(CheckCXXCompilerFlag)
    include(CheckCCompilerFlag)
   -include(CheckLinkerFlag)
   +# VERSION_GREATER_EQUAL requires CMake 3.7 or later.
   +# https://cmake.org/cmake/help/latest/command/if.html#version-greater-equal
   +if (CMAKE_VERSION VERSION_LESS 3.18)
   +    set(ZSTD_HAVE_CHECK_LINKER_FLAG false)
   +else ()
   +    set(ZSTD_HAVE_CHECK_LINKER_FLAG true)
   +endif ()
   +if (ZSTD_HAVE_CHECK_LINKER_FLAG)
   +    include(CheckLinkerFlag)
   +endif()
    
    function(EnableCompilerFlag _flag _C _CXX _LD)
        string(REGEX REPLACE "\\+" "PLUS" varname "${_flag}")
   @@ -20,7 +29,11 @@ function(EnableCompilerFlag _flag _C _CXX _LD)
            endif ()
        endif ()
        if (_LD)
   -        CHECK_LINKER_FLAG(C ${_flag} LD_FLAG_${varname})
   +        if (ZSTD_HAVE_CHECK_LINKER_FLAG)
   +            CHECK_LINKER_FLAG(C ${_flag} LD_FLAG_${varname})
   +        else ()
   +            set(LD_FLAG_${varname} false)
   +        endif ()
            if (LD_FLAG_${varname})
                set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${_flag}" 
PARENT_SCOPE)
                set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} 
${_flag}" PARENT_SCOPE)
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to