-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Jim Wang (Beyondsoft Corporation) <[email protected]>
- Loading branch information
1 parent
aebac86
commit b81b6e4
Showing
9 changed files
with
39 additions
and
248 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,22 @@ | ||
diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThriftAlt.cmake | ||
similarity index 91% | ||
rename from cpp/cmake_modules/FindThrift.cmake | ||
rename to cpp/cmake_modules/FindThriftAlt.cmake | ||
index 2f20a5cb59..e317e2c7c4 100644 | ||
--- a/cpp/cmake_modules/FindThrift.cmake | ||
diff --git a/cpp/cmake_modules/FindThriftAlt.cmake b/cpp/cmake_modules/FindThriftAlt.cmake | ||
index f3e4902..65ceac8 100644 | ||
--- a/cpp/cmake_modules/FindThriftAlt.cmake | ||
+++ b/cpp/cmake_modules/FindThriftAlt.cmake | ||
@@ -28,7 +28,23 @@ | ||
# thrift::thrift, a library target to use Thrift | ||
# thrift::compiler, a executable target to use Thrift compiler | ||
|
||
+if(ThriftAlt_FOUND) | ||
+ return() | ||
+endif() | ||
@@ -45,7 +45,7 @@ endif() | ||
# * https://github.com/apache/thrift/pull/2725 | ||
# * https://github.com/apache/thrift/pull/2726 | ||
# * https://github.com/conda-forge/thrift-cpp-feedstock/issues/68 | ||
-if(NOT WIN32) | ||
+ | ||
set(find_package_args "") | ||
if(ThriftAlt_FIND_VERSION) | ||
list(APPEND find_package_args ${ThriftAlt_FIND_VERSION}) | ||
@@ -61,7 +61,7 @@ if(NOT WIN32) | ||
"${THRIFT_COMPILER}") | ||
return() | ||
endif() | ||
-endif() | ||
+ | ||
+set(find_package_args "") | ||
+if(ThriftAlt_FIND_VERSION) | ||
+ list(APPEND find_package_args ${ThriftAlt_FIND_VERSION}) | ||
+endif() | ||
+if(ThriftAlt_FIND_QUIETLY) | ||
+ list(APPEND find_package_args QUIET) | ||
+endif() | ||
+find_package(Thrift ${find_package_args}) | ||
if(Thrift_FOUND) | ||
+ set(ThriftAlt_FOUND TRUE) | ||
+ add_executable(thrift::compiler IMPORTED) | ||
+ set_target_properties(thrift::compiler PROPERTIES IMPORTED_LOCATION | ||
+ "${THRIFT_COMPILER}") | ||
return() | ||
endif() | ||
|
||
@@ -133,12 +149,12 @@ else() | ||
endif() | ||
|
||
find_package_handle_standard_args( | ||
- Thrift | ||
+ ThriftAlt | ||
REQUIRED_VARS THRIFT_LIB THRIFT_INCLUDE_DIR | ||
VERSION_VAR Thrift_VERSION | ||
HANDLE_COMPONENTS) | ||
|
||
-if(Thrift_FOUND) | ||
+if(ThriftAlt_FOUND) | ||
if(ARROW_THRIFT_USE_SHARED) | ||
add_library(thrift::thrift SHARED IMPORTED) | ||
else() | ||
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake | ||
index b7cd31f3d7..72b8cfe286 100644 | ||
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake | ||
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake | ||
@@ -1510,8 +1510,10 @@ macro(build_thrift) | ||
endmacro() | ||
|
||
if(ARROW_WITH_THRIFT) | ||
- # Thrift c++ code generated by 0.13 requires 0.11 or greater | ||
+ # Thrift C++ code generated by 0.13 requires 0.11 or greater | ||
resolve_dependency(Thrift | ||
+ HAVE_ALT | ||
+ TRUE | ||
REQUIRED_VERSION | ||
0.11.0 | ||
PC_PACKAGE_NAMES | ||
function(extract_thrift_version) | ||
if(ThriftAlt_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,13 @@ | ||
diff --git a/cpp/cmake_modules/Findutf8proc.cmake b/cpp/cmake_modules/Findutf8proc.cmake | ||
index 2f0f59a02c..f5382a8f21 100644 | ||
index e347414..83f2aa1 100644 | ||
--- a/cpp/cmake_modules/Findutf8proc.cmake | ||
+++ b/cpp/cmake_modules/Findutf8proc.cmake | ||
@@ -19,6 +19,21 @@ if(utf8proc_FOUND) | ||
return() | ||
endif() | ||
|
||
+if(ARROW_PACAKGE_KIND STREQUAL "vcpkg") | ||
+ set(find_package_args "") | ||
+ if(utf8proc_FIND_VERSION) | ||
+ list(APPEND find_package_args ${utf8proc_FIND_VERSION}) | ||
+ endif() | ||
+ if(utf8proc_FIND_QUIETLY) | ||
+ list(APPEND find_package_args QUIET) | ||
+ endif() | ||
+ find_package(utf8proc NAMES unofficial-utf8proc ${find_package_args}) | ||
+ if(utf8proc_FOUND) | ||
+ add_library(utf8proc::utf8proc ALIAS utf8proc) | ||
+ return() | ||
+ endif() | ||
+endif() | ||
+ | ||
function(extract_utf8proc_version) | ||
if(utf8proc_INCLUDE_DIR) | ||
file(READ "${utf8proc_INCLUDE_DIR}/utf8proc.h" UTF8PROC_H_CONTENT) | ||
@@ -30,7 +30,7 @@ if(ARROW_PACKAGE_KIND STREQUAL "vcpkg") | ||
if(utf8proc_FIND_REQUIRED) | ||
list(APPEND find_package_args REQUIRED) | ||
endif() | ||
- find_package(utf8proc NAMES unofficial-utf8proc ${find_package_args}) | ||
+ find_package(utf8proc NAMES unofficial-utf8proc) | ||
if(utf8proc_FOUND) | ||
add_library(utf8proc::utf8proc ALIAS utf8proc) | ||
return() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters