Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/scripts/msys2_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ case "${target}" in
packages+=(${MINGW_PACKAGE_PREFIX}-protobuf)
packages+=(${MINGW_PACKAGE_PREFIX}-python3-numpy)
packages+=(${MINGW_PACKAGE_PREFIX}-rapidjson)
packages+=(${MINGW_PACKAGE_PREFIX}-re2)
packages+=(${MINGW_PACKAGE_PREFIX}-snappy)
packages+=(${MINGW_PACKAGE_PREFIX}-thrift)
packages+=(${MINGW_PACKAGE_PREFIX}-zlib)
Expand Down
6 changes: 3 additions & 3 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -751,10 +751,10 @@ if(ARROW_WITH_UTF8PROC)
endif()

if(ARROW_WITH_RE2)
list(APPEND ARROW_LINK_LIBS RE2::re2)
list(APPEND ARROW_STATIC_LINK_LIBS RE2::re2)
list(APPEND ARROW_LINK_LIBS re2::re2)
list(APPEND ARROW_STATIC_LINK_LIBS re2::re2)
if(RE2_SOURCE STREQUAL "SYSTEM")
list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS RE2::re2)
list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS re2::re2)
endif()
endif()

Expand Down
14 changes: 14 additions & 0 deletions cpp/cmake_modules/FindRapidJSONAlt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@
# specific language governing permissions and limitations
# under the License.

set(find_package_args)
if(RapidJSONAlt_FIND_VERSION)
list(APPEND find_package_args ${RapidJSONAlt_FIND_VERSION})
endif()
if(RapidJSONAlt_FIND_QUIETLY)
list(APPEND find_package_args QUIET)
endif()
find_package(RapidJSON ${find_package_args})
if(RapidJSON_FOUND)
set(RapidJSONAlt_FOUND TRUE)
set(RAPIDJSON_INCLUDE_DIR ${RAPIDJSON_INCLUDE_DIRS})
return()
endif()

if(RapidJSON_ROOT)
find_path(RAPIDJSON_INCLUDE_DIR
NAMES rapidjson/rapidjson.h
Expand Down
13 changes: 13 additions & 0 deletions cpp/cmake_modules/FindgRPCAlt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set(find_package_args)
if(gRPCAlt_FIND_VERSION)
list(APPEND find_package_args ${gRPCAlt_FIND_VERSION})
endif()
if(gRPCAlt_FIND_QUIETLY)
list(APPEND find_package_args QUIET)
endif()
find_package(gRPC ${find_package_args})
if(gRPC_FOUND)
set(gRPCAlt_FOUND TRUE)
return()
endif()

unset(GRPC_ALT_VERSION)

if(ARROW_GRPC_USE_SHARED)
Expand Down
13 changes: 13 additions & 0 deletions cpp/cmake_modules/FindgflagsAlt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@
# specific language governing permissions and limitations
# under the License.

set(find_package_args)
if(gflagsAlt_FIND_VERSION)
list(APPEND find_package_args ${gflagsAlt_FIND_VERSION})
endif()
if(gflagsAlt_FIND_QUIETLY)
list(APPEND find_package_args QUIET)
endif()
find_package(gflags ${find_package_args})
if(gflags_FOUND)
set(gflagsAlt_FOUND TRUE)
return()
endif()

# TODO: Support version detection.

if(gflags_ROOT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@
# specific language governing permissions and limitations
# under the License.

set(find_package_args)
if(re2Alt_FIND_VERSION)
list(APPEND find_package_args ${re2Alt_FIND_VERSION})
endif()
if(re2Alt_FIND_QUIETLY)
list(APPEND find_package_args QUIET)
endif()
find_package(re2 ${find_package_args})
if(re2_FOUND)
set(re2Alt_FOUND TRUE)
return()
endif()

find_package(PkgConfig QUIET)
pkg_check_modules(RE2_PC re2)
if(RE2_PC_FOUND)
Expand Down Expand Up @@ -60,16 +73,10 @@ else()
find_path(RE2_INCLUDE_DIR NAMES re2/re2.h PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
endif()

find_package_handle_standard_args(RE2 REQUIRED_VARS RE2_LIB RE2_INCLUDE_DIR)
find_package_handle_standard_args(re2Alt REQUIRED_VARS RE2_LIB RE2_INCLUDE_DIR)

if(RE2_FOUND)
if(NOT TARGET RE2::re2)
add_library(RE2::re2 UNKNOWN IMPORTED)
set_target_properties(RE2::re2
PROPERTIES IMPORTED_LOCATION "${RE2_LIB}"
INTERFACE_INCLUDE_DIRECTORIES "${RE2_INCLUDE_DIR}")
endif()
# Some third-party dependencies (namely gRPC) are on the look-out for a lower-case re2 Target.
# CMake 3.2 does uppercase the FOUND variable
if(re2Alt_FOUND OR RE2ALT_FOUND)
if(NOT TARGET re2::re2)
add_library(re2::re2 UNKNOWN IMPORTED)
set_target_properties(re2::re2
Expand Down
Loading