Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cpp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

apidoc/html
apidoc/xml
*.log
21 changes: 21 additions & 0 deletions cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,27 @@ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON ..
make -j8 # if you have 8 CPU cores, otherwise adjust, use -j`nproc` for all cores
```

### Quick Build with Scripts

For convenience, we provide build scripts for Ubuntu and macOS that configure the following CMake options:

- `-DBUILD_BENCHMARKS=ON`: Build benchmark executables
- `-DCMAKE_BUILD_TYPE=Debug`: Build in debug mode
- `-DBUILD_TESTS=ON`: Build unit tests
- `-DBUILD_EXAMPLES=ON`: Build example executables

**Ubuntu:**
```bash
./build_ubuntu.sh
```

**macOS:**
```bash
./build_macos.sh
```

These scripts will automatically create the build directory, configure with CMake, and compile the project. Build logs will be saved to `build_ubuntu.log` or `build_macos.log`.

After building, you can run the unit tests with:

```bash
Expand Down
27 changes: 27 additions & 0 deletions cpp/build_macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Change this line to your arrow and parquet include path if needed
export CPATH="/opt/homebrew/include:$CPATH"

cmake -S . -B build_macos \
-DBUILD_BENCHMARKS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTS=ON \
-DBUILD_EXAMPLES=ON

cmake --build build_macos -j8 2>&1 | tee build_macos.log
24 changes: 24 additions & 0 deletions cpp/build_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

cmake -S . -B build_ubuntu \
-DBUILD_BENCHMARKS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTS=ON \
-DBUILD_EXAMPLES=ON

cmake --build build_ubuntu -j8 2>&1 | tee build_ubuntu.log
Loading