This is an automated email from the ASF dual-hosted git repository.

xiaokang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-graphar.git


The following commit(s) were added to refs/heads/main by this push:
     new 5657616e chore(scripts): add compile scripts in ubuntu and macos (#864)
5657616e is described below

commit 5657616ef5e733dc73d955f5ed9be563d16ce9e6
Author: Jason <[email protected]>
AuthorDate: Wed Feb 25 12:33:20 2026 +0800

    chore(scripts): add compile scripts in ubuntu and macos (#864)
    
    Co-authored-by: yxk485490 <[email protected]>
---
 cpp/.gitignore      |  1 +
 cpp/README.md       | 21 +++++++++++++++++++++
 cpp/build_macos.sh  | 27 +++++++++++++++++++++++++++
 cpp/build_ubuntu.sh | 24 ++++++++++++++++++++++++
 4 files changed, 73 insertions(+)

diff --git a/cpp/.gitignore b/cpp/.gitignore
index 0033ebe1..9efb7891 100644
--- a/cpp/.gitignore
+++ b/cpp/.gitignore
@@ -4,3 +4,4 @@
 
 apidoc/html
 apidoc/xml
+*.log
diff --git a/cpp/README.md b/cpp/README.md
index 21709bf7..02473507 100644
--- a/cpp/README.md
+++ b/cpp/README.md
@@ -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
diff --git a/cpp/build_macos.sh b/cpp/build_macos.sh
new file mode 100644
index 00000000..119e2491
--- /dev/null
+++ b/cpp/build_macos.sh
@@ -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
\ No newline at end of file
diff --git a/cpp/build_ubuntu.sh b/cpp/build_ubuntu.sh
new file mode 100644
index 00000000..82697a09
--- /dev/null
+++ b/cpp/build_ubuntu.sh
@@ -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
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to