Skip to content

ywq1113/cppsdk

Repository files navigation

cppsdk

Bootstrap

sudo bash ./bootstrap.sh

Developer

Vscode

settings.json

{
    "C_Cpp.default.compileCommands": "${workspaceFolder}/compile_commands.json"
}

compile_commands.json

bazel run @wolfd_bazel_compile_commands//:generate_compile_commands

or

bazel run compile_commands

Format

find . \( -name "*.h" -o -name "*.cpp" \) -print0 | xargs -0 clang-format -i

Build

How to Compiler this project.

bazel clean --expunge
bazel mod tidy
bazel build //sdk/...

Test

How to run unit tests by target.

bazel test //sdk/container/tests:segment_tree_test

# If need more info
# bazel test --test_verbose_timeout_warnings --test_output=all //sdk/container/tests/...

How to run all unit tests.

bazel test //...

Benchmark

How to run benchmark by target.

bazel run -c opt //sdk/benchmark/segment_tree:segment_tree_benchmark_no_simd
bazel run -c opt //sdk/benchmark/segment_tree:segment_tree_benchmark_simd
bazel run -c opt //sdk/benchmark/ringbuffer:spsc_ringbuffer_benchmark

Note: If you run a Bazel target without "-c opt", Bazel will build a debug binary or library by default. Add "-c opt" to build with release (optimized) settings for accurate.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors