-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support finding installed arrow libraries from system (#9992)
Summary: Gluten project needs to pre-build arrow before building velox. And it's also possible that arrow libs have already been installed, e.g., via vcpkg. Then, velox doesn't need to build arrow from source again. Pull Request resolved: #9992 Reviewed By: xiaoxmeng Differential Revision: D59122226 Pulled By: bikramSingh91 fbshipit-source-id: 8a0320cc2a57cec3bf3aa894ccc1e8f8c1fb175b
- Loading branch information
1 parent
fd955bf
commit 0d80228
Showing
8 changed files
with
166 additions
and
53 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
find_library(ARROW_LIB libarrow.a) | ||
find_library(PARQUET_LIB libparquet.a) | ||
find_library(ARROW_TESTING_LIB libarrow_testing.a) | ||
if("${ARROW_LIB}" STREQUAL "ARROW_LIB-NOTFOUND" | ||
# OR "${PARQUET_LIB}" STREQUAL "PARQUET_LIB-NOTFOUND" | ||
OR "${ARROW_TESTING_LIB}" STREQUAL "ARROW_TESTING_LIB-NOTFOUND") | ||
set(Arrow_FOUND false) | ||
return() | ||
endif() | ||
set(Arrow_FOUND true) | ||
|
||
add_library(arrow STATIC IMPORTED GLOBAL) | ||
add_library(parquet STATIC IMPORTED GLOBAL) | ||
add_library(arrow_testing STATIC IMPORTED GLOBAL) | ||
|
||
find_path(ARROW_INCLUDE_PATH arrow/api.h) | ||
set_target_properties( | ||
arrow arrow_testing parquet PROPERTIES INTERFACE_INCLUDE_DIRECTORIES | ||
${ARROW_INCLUDE_PATH}) | ||
set_target_properties(arrow PROPERTIES IMPORTED_LOCATION ${ARROW_LIB}) | ||
set_target_properties(parquet PROPERTIES IMPORTED_LOCATION ${PARQUET_LIB}) | ||
set_target_properties(arrow_testing PROPERTIES IMPORTED_LOCATION | ||
${ARROW_TESTING_LIB}) |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
include_guard(GLOBAL) | ||
|
||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/arrow) |
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
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