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
4 changes: 2 additions & 2 deletions bindings/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ find_package(Threads REQUIRED)
find_package(Arrow REQUIRED)

if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -122,4 +122,4 @@ add_dependencies(fluss_cpp cargo_build)
if (FLUSS_ENABLE_ADDRESS_SANITIZER)
target_compile_options(fluss_cpp PRIVATE -fsanitize=leak,address,undefined -fno-omit-frame-pointer -fno-common -O1)
target_link_options(fluss_cpp PRIVATE -fsanitize=leak,address,undefined)
endif()
endif()
3 changes: 3 additions & 0 deletions bindings/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ cmake ..
cmake --build .
```

By default, CMake now uses `Release` when `CMAKE_BUILD_TYPE` is not specified.

**With Bazel:**

```bash
cd bindings/cpp
bazel build //...
```
`ci.sh` defaults to optimized builds via `-c opt` (override with `BAZEL_BUILD_FLAGS` if needed).
See [ci.sh](ci.sh) for the CI build sequence.


Expand Down
7 changes: 4 additions & 3 deletions bindings/cpp/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
set -xe

DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
BAZEL_BUILD_FLAGS="${BAZEL_BUILD_FLAGS:--c opt}"

# Set Bazel output base to bazel-build directory
# This ensures all Bazel outputs are in bazel-build/.bazel-output-base
Expand All @@ -33,16 +34,16 @@ bazel() {
}

compile() {
bazel build //:fluss_cpp
bazel build ${BAZEL_BUILD_FLAGS} //:fluss_cpp
}

build_example() {
bazel build //:fluss_cpp_example
bazel build ${BAZEL_BUILD_FLAGS} //:fluss_cpp_example
}

run_example() {
build_example
bazel run //:fluss_cpp_example
bazel run ${BAZEL_BUILD_FLAGS} //:fluss_cpp_example
}

clean() {
Expand Down
Loading