You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/12 09:48:39 UTC
[GitHub] [arrow] g302ge opened a new issue, #13866: How can I use arrow in my project as a git submodule
g302ge opened a new issue, #13866:
URL: https://github.com/apache/arrow/issues/13866
I am currently bootstrap a project using arrow/cpp, I want to use arrow without install it into system lib path. So I use the git command to make the arrow as a submodule, here are two problems
1. if I can directly using the add_subdirectoy for arrow project
2. if I use the LZ4 or ZLIB compression lib ,could I mixin them with arrow in one CMakeLists.txt ? If the answer is yes, how to ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] g302ge commented on issue #13866: How can I use arrow in my project as a git submodule
Posted by GitBox <gi...@apache.org>.
g302ge commented on issue #13866:
URL: https://github.com/apache/arrow/issues/13866#issuecomment-1212931745
Here is my solution with cmake
```
cmake_minimum_required(VERSION 3.11)
# require the submodule
find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE)
message(STATUS "Submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
endif()
endif()
project(columnar-bench)
# googletest framework
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest)
# benchmark framework
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/benchmark)
# gflags
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/gflags)
# # snappy
#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/snappy)
# # brotil
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/brotli)
# # zlib
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/build/cmake)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/lz4/build/cmake)
# arrow
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/arrow_built")
set(CMAKE_INSTALL_LIBDIR "lib")
set(ARROW_CXXFLAGS "-ldl")
set(CMAKE_BUILD_TYPE "Debug")
set(ARROW_PLASMA OFF)
set(ARROW_PYTHON OFF)
set(ARROW_PARQUET ON)
set(ARROW_WITH_ZLIB ON)
set(ARROW_BUILD_BENCHMARKS OFF)
set(ARROW_BUILD_EXAMPLES OFF)
set(ARROW_BUILD_TESTS OFF)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/arrow/cpp)
# binary
add_executable(reading ${CMAKE_CURRENT_SOURCE_DIR}/src/reading_bench.cc)
add_executable(prepare ${CMAKE_CURRENT_SOURCE_DIR}/src/prepare_data.cc)
```
but there is still an error
···
CMake Error at third_party/arrow/cpp/src/arrow/CMakeLists.txt:614 (add_dependencies):
add_dependencies called with incorrect number of arguments
CMake Error at third_party/arrow/cpp/src/arrow/io/CMakeLists.txt:39 (if):
if given arguments:
"NOT" "(" "STREQUAL" "NONE" ")"
Unknown arguments specified
···
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] g302ge closed issue #13866: How can I use arrow in my project as a git submodule
Posted by GitBox <gi...@apache.org>.
g302ge closed issue #13866: How can I use arrow in my project as a git submodule
URL: https://github.com/apache/arrow/issues/13866
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] kou commented on issue #13866: How can I use arrow in my project as a git submodule
Posted by GitBox <gi...@apache.org>.
kou commented on issue #13866:
URL: https://github.com/apache/arrow/issues/13866#issuecomment-1213089039
Apache Arrow C++ doesn't support building by `add_subdirectory()`. Please use `ExternalProject_Add()` https://cmake.org/cmake/help/latest/module/ExternalProject.html instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] hqx871 commented on issue #13866: How can I use arrow in my project as a git submodule
Posted by GitBox <gi...@apache.org>.
hqx871 commented on issue #13866:
URL: https://github.com/apache/arrow/issues/13866#issuecomment-1254809582
can someone give an example?
> Apache Arrow C++ doesn't support building by `add_subdirectory()`. Please use `ExternalProject_Add()` https://cmake.org/cmake/help/latest/module/ExternalProject.html instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] How can I use arrow in my project as a git submodule [arrow]
Posted by "ZhangChaoming (via GitHub)" <gi...@apache.org>.
ZhangChaoming commented on issue #13866:
URL: https://github.com/apache/arrow/issues/13866#issuecomment-2088745136
Any solution? @g302ge
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org