Hello,

On Ubuntu, I managed to get a local external (i.e., to Arrow) project to build 
against a locally and custom-built Arrow project working using the following:

  *   Locally build Arrow and install it to a directory $ARROW_ROOT_DIR
  *   Configure the external project build using:  cmake 
-DARROW_CMAKE_DIR=$ARROW_ROOT_DIR/lib/cmake/arrow
  *   Include the following cmake-directives in the external project (which 
uses Arrow, ArrowDataset, and Parquet):

set(CMAKE_MODULE_PATH ${ARROW_CMAKE_DIR})
set(Arrow_DIR ${ARROW_CMAKE_DIR})
set(ArrowDataset_DIR ${ARROW_CMAKE_DIR})
set(Parquet_DIR ${ARROW_CMAKE_DIR})

  *   Build the external project and run the executable with 
LD_LIBRARY_PATH=$ARROW_ROOT_DIR/lib

For some reason, I had to set a "*_DIR" cmake-variable for each Arrow 
dependency, which is not as clean as one would like. Without these, cmake fails 
to find the local Arrow project install and mixes it up with a system-wide 
Arrow installation, leading to the external project failing to build. If you 
know of a cleaner way to configure the external project, please advise.


Thanks,
Yaron.
________________________________
From: Li Jin <ice.xell...@gmail.com>
Sent: Thursday, February 3, 2022 3:40 PM
To: dev@arrow.apache.org <dev@arrow.apache.org>
Cc: rt...@hotmail.com <rt...@hotmail.com>
Subject: [C++] Build/Link against master / custom branch

Hello!

We are trying to write some program similar to:

https://github.com/apache/arrow/blob/master/cpp/examples/arrow/execution_plan_documentation_examples.cc

to test Arrow compute engine performance.

We would like to build the example against Arrow default because we added a 
"square root" function to it. I wonder if there is an easy way to build/link my 
program against github master / custom branch or if we should put it under 
cpp/examples/arrow and compile arrow lib and the main program together?

Thanks,
Li

Reply via email to