This repository contains a minimal bazel build target for Google C++ status macros, redistributed from mediapipe.
This repo supports integration with Bzlmod.
I'll see if I can get this in the central repository, but for now looks like you'll have to set it up with a local registry.
If you're not using Bzlmod, add the following to your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "status_macros",
commit = "1592ab2d4b4f92976fc3f4a6cb3a1323a4b549c3",
remote = "https://github.com/jimrogerz/status_macros.git",
)
Also make sure you have transitive dependencies from this repo's WORKSPACE.
Add "@status_macros//:status_macros"
to BUILD deps for targets that use this.
Add #include "status_macros.h"
to your source.
See RETURN_IF_ERROR and ASSIGN_OR_RETURN.