1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index b7a1dae..2669b15 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -669,7 +669,7 @@ endif()
if(ARROW_WITH_BROTLI)
# Order is important for static linking
- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon)
+ set(ARROW_BROTLI_LIBS unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon)
list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS})
list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS})
if(Brotli_SOURCE STREQUAL "SYSTEM")
@@ -685,9 +685,9 @@ if(ARROW_WITH_BZ2)
endif()
if(ARROW_WITH_LZ4)
- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4)
+ list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4)
if(Lz4_SOURCE STREQUAL "SYSTEM")
- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4)
+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS lz4::lz4)
endif()
endif()
@@ -736,10 +736,10 @@ if(ARROW_S3)
endif()
if(ARROW_WITH_UTF8PROC)
- list(APPEND ARROW_LINK_LIBS utf8proc::utf8proc)
- list(APPEND ARROW_STATIC_LINK_LIBS utf8proc::utf8proc)
+ list(APPEND ARROW_LINK_LIBS utf8proc)
+ list(APPEND ARROW_STATIC_LINK_LIBS utf8proc)
if(utf8proc_SOURCE STREQUAL "SYSTEM")
- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS utf8proc::utf8proc)
+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS utf8proc)
endif()
endif()
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 83ea3aa..d592fc3 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -53,7 +53,7 @@ set(ARROW_THIRDPARTY_DEPENDENCIES
AWSSDK
benchmark
Boost
- Brotli
+ unofficial-brotli
BZip2
c-ares
gflags
@@ -61,14 +61,14 @@ set(ARROW_THIRDPARTY_DEPENDENCIES
gRPC
GTest
LLVM
- Lz4
+ lz4
ORC
re2
Protobuf
RapidJSON
Snappy
Thrift
- utf8proc
+ unofficial-utf8proc
xsimd
ZLIB
zstd)
@@ -956,7 +956,7 @@ macro(build_snappy)
endmacro()
if(ARROW_WITH_SNAPPY)
- resolve_dependency(Snappy)
+ resolve_dependency(Snappy USE_CONFIG TRUE)
# TODO: Don't use global includes but rather target_include_directories
get_target_property(SNAPPY_INCLUDE_DIRS Snappy::snappy INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${SNAPPY_INCLUDE_DIRS})
@@ -1021,10 +1021,16 @@ macro(build_brotli)
endmacro()
if(ARROW_WITH_BROTLI)
- resolve_dependency(Brotli)
+ set(unofficial-brotli_SOURCE "SYSTEM")
+ resolve_dependency(unofficial-brotli USE_CONFIG TRUE)
# TODO: Don't use global includes but rather target_include_directories
- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon
- INTERFACE_INCLUDE_DIRECTORIES)
+ if (BUILD_SHARED_LIBS)
+ get_target_property(BROTLI_INCLUDE_DIR unofficial::brotli::brotlicommon
+ INTERFACE_INCLUDE_DIRECTORIES)
+ else()
+ get_target_property(BROTLI_INCLUDE_DIR unofficial::brotli::brotlicommon-static
+ INTERFACE_INCLUDE_DIRECTORIES)
+ endif()
include_directories(SYSTEM ${BROTLI_INCLUDE_DIR})
endif()
@@ -1141,7 +1147,7 @@ macro(build_glog)
endmacro()
if(ARROW_USE_GLOG)
- resolve_dependency(GLOG)
+ resolve_dependency(glog USE_CONFIG TRUE)
# TODO: Don't use global includes but rather target_include_directories
get_target_property(GLOG_INCLUDE_DIR glog::glog INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${GLOG_INCLUDE_DIR})
@@ -1214,8 +1220,7 @@ endmacro()
if(ARROW_NEED_GFLAGS)
set(ARROW_GFLAGS_REQUIRED_VERSION "2.1.0")
resolve_dependency(gflags
- HAVE_ALT
- TRUE
+ USE_CONFIG TRUE
REQUIRED_VERSION
${ARROW_GFLAGS_REQUIRED_VERSION}
IS_RUNTIME_DEPENDENCY
@@ -1316,7 +1321,7 @@ if(ARROW_WITH_THRIFT)
# to build Boost, so don't look again if already found.
if(NOT Thrift_FOUND AND NOT THRIFT_FOUND)
# Thrift c++ code generated by 0.13 requires 0.11 or greater
- resolve_dependency(Thrift REQUIRED_VERSION 0.11.0)
+ resolve_dependency(Thrift USE_CONFIG TRUE REQUIRED_VERSION 0.11.0)
endif()
# TODO: Don't use global includes but rather target_include_directories
include_directories(SYSTEM ${THRIFT_INCLUDE_DIR})
@@ -1416,13 +1421,17 @@ if(ARROW_WITH_PROTOBUF)
else()
set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1")
endif()
- resolve_dependency(Protobuf REQUIRED_VERSION ${ARROW_PROTOBUF_REQUIRED_VERSION})
+ resolve_dependency(Protobuf USE_CONFIG TRUE REQUIRED_VERSION ${ARROW_PROTOBUF_REQUIRED_VERSION})
if(ARROW_PROTOBUF_USE_SHARED AND MSVC_TOOLCHAIN)
add_definitions(-DPROTOBUF_USE_DLLS)
endif()
# TODO: Don't use global includes but rather target_include_directories
+ if (TARGET protobuf::libprotobuf)
+ get_target_property(PROTOBUF_INCLUDE_DIR protobuf::libprotobuf
+ INTERFACE_INCLUDE_DIRECTORIES)
+ endif()
include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIR})
if(TARGET arrow::protobuf::libprotobuf)
@@ -1471,12 +1480,18 @@ if(ARROW_WITH_PROTOBUF)
# Log protobuf paths as we often see issues with mixed sources for
# the libraries and protoc.
+ if (NOT TARGET protobuf::protoc)
get_target_property(PROTOBUF_PROTOC_EXECUTABLE ${ARROW_PROTOBUF_PROTOC}
IMPORTED_LOCATION)
+ endif()
message(STATUS "Found protoc: ${PROTOBUF_PROTOC_EXECUTABLE}")
# Protobuf_PROTOC_LIBRARY is set by all versions of FindProtobuf.cmake
message(STATUS "Found libprotoc: ${Protobuf_PROTOC_LIBRARY}")
+ if (NOT TARGET protobuf::libprotobuf)
get_target_property(PROTOBUF_LIBRARY ${ARROW_PROTOBUF_LIBPROTOBUF} IMPORTED_LOCATION)
+ else()
+ set(PROTOBUF_LIBRARY protobuf::libprotobuf)
+ endif()
message(STATUS "Found libprotobuf: ${PROTOBUF_LIBRARY}")
message(STATUS "Found protobuf headers: ${PROTOBUF_INCLUDE_DIR}")
endif()
@@ -1904,7 +1919,7 @@ endmacro()
if(ARROW_WITH_RAPIDJSON)
set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0")
resolve_dependency(RapidJSON
- HAVE_ALT
+ USE_CONFIG
TRUE
REQUIRED_VERSION
${ARROW_RAPIDJSON_REQUIRED_VERSION}
@@ -2047,10 +2062,11 @@ macro(build_lz4)
endmacro()
if(ARROW_WITH_LZ4)
- resolve_dependency(Lz4)
+ set(lz4_SOURCE "SYSTEM")
+ resolve_dependency(lz4 USE_CONFIG TRUE)
# TODO: Don't use global includes but rather target_include_directories
- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES)
+ get_target_property(LZ4_INCLUDE_DIR lz4::lz4 INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${LZ4_INCLUDE_DIR})
endif()
@@ -2111,7 +2127,7 @@ macro(build_zstd)
endmacro()
if(ARROW_WITH_ZSTD)
- resolve_dependency(zstd)
+ resolve_dependency(zstd USE_CONFIG TRUE)
if(TARGET zstd::libzstd)
set(ARROW_ZSTD_LIBZSTD zstd::libzstd)
@@ -2273,13 +2289,13 @@ macro(build_utf8proc)
endmacro()
if(ARROW_WITH_UTF8PROC)
- resolve_dependency(utf8proc)
+ resolve_dependency(unofficial-utf8proc USE_CONFIG TRUE)
add_definitions(-DARROW_WITH_UTF8PROC)
# TODO: Don't use global definitions but rather
# target_compile_definitions or target_link_libraries
- get_target_property(UTF8PROC_COMPILER_DEFINITIONS utf8proc::utf8proc
+ get_target_property(UTF8PROC_COMPILER_DEFINITIONS utf8proc
INTERFACE_COMPILER_DEFINITIONS)
if(UTF8PROC_COMPILER_DEFINITIONS)
add_definitions(-D${UTF8PROC_COMPILER_DEFINITIONS})
@@ -2287,7 +2303,7 @@ if(ARROW_WITH_UTF8PROC)
# TODO: Don't use global includes but rather
# target_include_directories or target_link_libraries
- get_target_property(UTF8PROC_INCLUDE_DIR utf8proc::utf8proc
+ get_target_property(UTF8PROC_INCLUDE_DIR utf8proc
INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${UTF8PROC_INCLUDE_DIR})
endif()
@@ -2342,7 +2358,7 @@ endmacro()
# Dependencies for Arrow Flight RPC
macro(build_grpc)
- resolve_dependency(c-ares HAVE_ALT TRUE)
+ resolve_dependency(c-ares HAVE_ALT TRUE USE_CONFIG TRUE)
# TODO: Don't use global includes but rather target_include_directories
get_target_property(c-ares_INCLUDE_DIR c-ares::cares INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${c-ares_INCLUDE_DIR})
@@ -2614,7 +2630,7 @@ endmacro()
if(ARROW_WITH_GRPC)
set(ARROW_GRPC_REQUIRED_VERSION "1.17.0")
resolve_dependency(gRPC
- HAVE_ALT
+ USE_CONFIG
TRUE
REQUIRED_VERSION
${ARROW_GRPC_REQUIRED_VERSION})
@@ -2622,6 +2638,10 @@ if(ARROW_WITH_GRPC)
# TODO: Don't use global includes but rather target_include_directories
get_target_property(GRPC_INCLUDE_DIR gRPC::grpc++ INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${GRPC_INCLUDE_DIR})
+ if (ABSL_USE_CXX17)
+ message(STATUS "Found absl uses CXX17, enable CXX17 feature.")
+ set(CMAKE_CXX_STANDARD 17)
+ endif()
if(GRPC_VENDORED)
set(GRPCPP_PP_INCLUDE TRUE)
diff --git a/cpp/src/arrow/adapters/orc/CMakeLists.txt b/cpp/src/arrow/adapters/orc/CMakeLists.txt
index 516196c..ebc4881 100644
--- a/cpp/src/arrow/adapters/orc/CMakeLists.txt
+++ b/cpp/src/arrow/adapters/orc/CMakeLists.txt
@@ -29,7 +29,7 @@ set(ORC_MIN_TEST_LIBS
GTest::gtest_main
GTest::gtest
Snappy::snappy
- LZ4::lz4
+ lz4::lz4
ZLIB::ZLIB)
if(ARROW_BUILD_STATIC)
|