-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: sunby <[email protected]>
- Loading branch information
Showing
6 changed files
with
114 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
function(build_arrow) | ||
include(ExternalProject) | ||
set(ARROW_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/arrow-ep) | ||
|
||
file(MAKE_DIRECTORY | ||
${ARROW_PREFIX} | ||
"${ARROW_PREFIX}/include" | ||
"${ARROW_PREFIX}/lib" | ||
) | ||
ExternalProject_Add( | ||
arrow_ep | ||
GIT_REPOSITORY [email protected]:apache/arrow.git | ||
GIT_TAG 740889f | ||
CMAKE_ARGS | ||
-DARROW_PARQUET=ON | ||
-DARROW_FILESYSTEM=ON | ||
-DARROW_S3=ON | ||
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> | ||
SOURCE_SUBDIR cpp | ||
INSTALL_DIR ${ARROW_PREFIX} | ||
) | ||
|
||
ExternalProject_Get_Property(arrow_ep install_dir) | ||
|
||
message(STATUS ${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep-build/release/libparquet.so) | ||
add_library(libarrow SHARED IMPORTED) | ||
set_target_properties(libarrow | ||
PROPERTIES | ||
IMPORTED_GLOBAL TRUE | ||
IMPORTED_LOCATION ${ARROW_PREFIX}/lib/libarrow.so | ||
INTERFACE_INCLUDE_DIRECTORIES ${install_dir}/include/ | ||
) | ||
|
||
add_library(libparquet SHARED IMPORTED) | ||
set_target_properties(libparquet | ||
PROPERTIES | ||
IMPORTED_GLOBAL TRUE | ||
IMPORTED_LOCATION ${ARROW_PREFIX}/lib/libparquet.so | ||
INTERFACE_INCLUDE_DIRECTORIES ${install_dir}/include/ | ||
) | ||
|
||
add_dependencies(libarrow arrow_ep) | ||
add_dependencies(libparquet arrow_ep) | ||
endfunction() | ||
|
||
build_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
function(build_glog) | ||
include(ExternalProject) | ||
set(GLOG_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/glog-ep) | ||
|
||
file(MAKE_DIRECTORY | ||
${GLOG_PREFIX} | ||
"${GLOG_PREFIX}/include" | ||
"${GLOG_PREFIX}/lib" | ||
) | ||
ExternalProject_Add( | ||
glog_ep | ||
GIT_REPOSITORY [email protected]:google/glog.git | ||
GIT_TAG v0.6.0 | ||
CMAKE_ARGS | ||
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> | ||
INSTALL_DIR ${GLOG_PREFIX} | ||
) | ||
|
||
ExternalProject_Get_Property(glog_ep install_dir) | ||
|
||
add_library(libglog SHARED IMPORTED) | ||
set_target_properties(libglog | ||
PROPERTIES | ||
IMPORTED_GLOBAL TRUE | ||
IMPORTED_LOCATION ${GLOG_PREFIX}/lib/libglog.so | ||
INTERFACE_INCLUDE_DIRECTORIES ${install_dir}/include/ | ||
) | ||
|
||
add_dependencies(libglog glog_ep) | ||
endfunction() | ||
|
||
build_glog() |
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,3 @@ | ||
add_subdirectory(gtest) | ||
add_subdirectory(boost) | ||
add_subdirectory(protobuf) |
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,12 @@ | ||
include(FetchContent) | ||
|
||
message(STATUS "Fetching Boost 1.84.0") | ||
FetchContent_Declare( | ||
Boost | ||
URL https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.xz | ||
URL_MD5 893b5203b862eb9bbd08553e24ff146a | ||
DOWNLOAD_EXTRACT_TIMESTAMP ON | ||
) | ||
|
||
set(BOOST_INCLUDE_LIBRARIES uuid algorithm filesystem) | ||
FetchContent_MakeAvailable(Boost) |
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,10 @@ | ||
include(FetchContent) | ||
|
||
message(STATUS "Fetching googletest") | ||
FetchContent_Declare( | ||
googletest | ||
GIT_REPOSITORY [email protected]:google/googletest.git | ||
GIT_TAG v1.13.0 | ||
) | ||
|
||
FetchContent_MakeAvailable(googletest) |
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,11 @@ | ||
include(FetchContent) | ||
|
||
message(STATUS "Fetching protobuf") | ||
FetchContent_Declare(protobuf | ||
GIT_REPOSITORY [email protected]:protocolbuffers/protobuf.git | ||
GIT_TAG v3.21.4 | ||
) | ||
|
||
set(protobuf_BUILD_TESTS OFF) | ||
set(protobuf_BUILD_PROTOC_BINARIES OFF) | ||
FetchContent_MakeAvailable(protobuf) |