Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 865 Bytes

File metadata and controls

39 lines (27 loc) · 865 Bytes

Build Utils Module

This module provides common build utilities and macros for strict C++ development using Bazel.

Features

  • Strict C++ Macros: Wrappers around cc_library, cc_binary, and cc_test that enforce C++20 and warnings-as-errors.
  • Lint configuration: It provide .clang-tidy and .clang-format configuration files.

Usage

1. Add dependency in MODULE.bazel

bazel_dep(name = "build_utils", version = "0.0.1")

If you are using it locally:

local_path_override(
    module_name = "build_utils",
    path = "path/to/build_utils",
)

2. Use Strict Macros

In your BUILD.bazel files:

load("@build_utils//:defs.bzl", "strict_cc_library", "strict_cc_binary", "strict_cc_test")

strict_cc_library(
    name = "my_lib",
    srcs = ["my_lib.cpp"],
    hdrs = ["my_lib.hpp"],
)