kou commented on pull request #9450:
URL: https://github.com/apache/arrow/pull/9450#issuecomment-785413747


   How about this?
   
   ```diff
   diff --git a/cpp/cmake_modules/DefineOptions.cmake 
b/cpp/cmake_modules/DefineOptions.cmake
   index e4df40d61..c0abea7a2 100644
   --- a/cpp/cmake_modules/DefineOptions.cmake
   +++ b/cpp/cmake_modules/DefineOptions.cmake
   @@ -363,7 +363,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL 
"${CMAKE_CURRENT_SOURCE_DIR}")
    
      define_option(
        ARROW_WITH_UTF8PROC
   -    "Build with support for Unicode properties using the utf8proc 
library;(only used if ARROW_COMPUTE is ON)"
   +    "Build with support for Unicode properties using the utf8proc 
library;(only used if ARROW_COMPUTE is ON or ARROW_GANDIVA is ON)"
        ON)
      define_option(
        ARROW_WITH_RE2
   diff --git a/cpp/src/gandiva/precompiled/CMakeLists.txt 
b/cpp/src/gandiva/precompiled/CMakeLists.txt
   index 7343bc052..76148a3c7 100644
   --- a/cpp/src/gandiva/precompiled/CMakeLists.txt
   +++ b/cpp/src/gandiva/precompiled/CMakeLists.txt
   @@ -77,6 +77,16 @@ foreach(SRC_FILE ${PRECOMPILED_SRCS})
               ${ARROW_GANDIVA_PC_CXX_FLAGS}
               -I${CMAKE_SOURCE_DIR}/src
               -I${ARROW_BINARY_DIR}/src)
   +  if(ARROW_WITH_UTF8PROC)
   +    list(APPEND PRECOMPILE_COMMAND -DARROW_WITH_UTF8PROC)
   +    if(UTF8PROC_COMPILER_DEFINITIONS)
   +      # This doesn't work when multiple definitions exist.
   +      list(APPEND PRECOMPILE_COMMAND "-D${UTF8PROC_COMPILER_DEFINITIONS}")
   +    endif()
   +    if(UTF8PROC_INCLUDE_DIR)
   +      list(APPEND PRECOMPILE_COMMAND "-I${UTF8PROC_INCLUDE_DIR}")
   +    endif()
   +  endif()
      if(NOT ARROW_USE_NATIVE_INT128)
        list(APPEND PRECOMPILE_COMMAND -I${Boost_INCLUDE_DIR})
      endif()
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to