You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/11/25 20:22:34 UTC

[GitHub] [arrow] kou commented on a change in pull request #8756: ARROW-10541: [C++] Add re2 library to core arrow / ARROW_WITH_RE2

kou commented on a change in pull request #8756:
URL: https://github.com/apache/arrow/pull/8756#discussion_r530622823



##########
File path: cpp/CMakeLists.txt
##########
@@ -330,6 +330,10 @@ if(ARROW_BUILD_BENCHMARKS
   set(ARROW_TESTING ON)
 endif()
 
+if(ARROW_GANDIVA)
+  set(ARROW_WITH_RE2 ON)
+endif()

Review comment:
       How about forcing to enable/disable `ARROW_WITH_RE2` in `ThridpartyToolchain.cmake` like `ARROW_WITH_THRIFT`?
   

##########
File path: cpp/cmake_modules/DefineOptions.cmake
##########
@@ -362,7 +362,9 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
   define_option(ARROW_WITH_ZSTD "Build with zstd compression" OFF)
 
   define_option(ARROW_WITH_UTF8PROC
-                "Build with support for Unicode properties using the utf8proc library" ON)
+                "Build with support for Unicode properties using the utf8proc library (only used if ARROW_COMPUTE is ON)" ON)
+  define_option(ARROW_WITH_RE2
+    "Build with support for regular expressions using the re2 library (only used if ARROW_COMPUTE or ARROW_GANDIVA is ON)" ON)

Review comment:
       We can remove `ARROW_WITH_UTF8PROC` and `ARROW_WITH_RE2` if we set them in `ThirdpartyToolchain.cmake` internally like `ARROW_WITH_THRIFT`.

##########
File path: cpp/CMakeLists.txt
##########
@@ -746,6 +750,14 @@ if(ARROW_WITH_UTF8PROC)
   endif()
 endif()
 
+if(ARROW_WITH_RE2)
+  list(APPEND ARROW_LINK_LIBS RE2::re2)
+  list(APPEND ARROW_STATIC_LINK_LIBS RE2::re2)
+  if(utf8proc_SOURCE STREQUAL "SYSTEM")

Review comment:
       ```suggestion
     if(RE2_SOURCE STREQUAL "SYSTEM")
   ```




----------------------------------------------------------------
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:
users@infra.apache.org