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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to