Apache GraphAr C++ Library
The C++ Library for Apache GraphAr
|
This directory contains the code and build system for the GraphAr C++ library.
GraphAr C++ uses CMake as a build configuration system. We recommend building out-of-source. If you are not familiar with this terminology:
cmake
is invoked directly from the cpp
directory. This can be inflexible when you wish to maintain multiple build environments (e.g. one for debug builds and another for release builds)cmake
is invoked from another directory, creating an isolated build environment that does not interact with any other build environment. For example, you could create cpp/build-debug
and invoke cmake $CMAKE_ARGS ..
from this directoryBuilding requires:
make
build utilitiesarrow-dev
, arrow-dataset
, arrow-acero
and parquet
modules) for Arrow filesystem support. You can refer to Apache Arrow Installation to install the required modules.Dependencies for optional features:
clang-format-8
for code formattingOn Ubuntu/Debian, you can install the required packages with:
On macOS, you can use Homebrew to install the required packages:
[!NOTE] Currently, the Arrow C++ library has disabled ARROW_ORC in the brew formula, so you need to build and install the Arrow C++ library manually (with
-DARROW_ORC=True
).
All the instructions below assume that you have cloned the GraphAr git repository and navigated to the cpp
subdirectory with:
Release build:
Debug build with unit tests:
After building, you can run the unit tests with:
Build with examples, you should build the project with BUILD_EXAMPLES
option, then run:
Build with benchmarks, you should build the project with BUILD_BENCHMARKS
option, then run:
Extra Build Options:
-DGRAPHAR_BUILD_STATIC=ON
: Build GraphAr as static libraries.-DUSE_STATIC_ARROW=ON
: Link arrow static library to build GraphAr. If set this option, the option GRAPHAR_BUILD_STATIC=ON
will be set.After the building, you can install the GraphAr C++ library with:
You should build the project with ENABLE_DOCS
option. Then run:
The API document is generated in the directory docs_doxygen
.
To format and lint the code, run:
Please refer to our GraphAr C++ API Reference.