Skip to content

Yuki-cpp-Lab/build_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"],
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors