mailto...@gmail.com
unread,Mar 11, 2025, 8:33:41 AMMar 11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bazel-discuss
I have a mono repository containing source code that is divided into several Bazel modules (bzlmod). When I build the C++ code, bazel exclude build warnings from the modules since it consider that code to be external and is hence using -isystem includes for those header files. However, in my case, for all Bazel modules that are defined within the mono repository, I want build warnings enabled. For modules that are not version controlled within the mono repository, I want build warnings to be excluded.
Is this somehow supported by bazel already?
Example:
mono/MODULE.bazel
mono/BUILD.bazel
mono/.bazelrc # common --override_module=module_x=%workspace%/module_x
mono/module_x/MODULE.bazel
mono/module_x/BUILD.bazel # cc_library(name="x", hdrs=[x.hpp"], ...)
mono/module_x/x.hpp
mono/module_x/x.cpp
When building @module_x//:x I want Bazel to include "x.hpp" using -I and NOT -isystem.
However, when building source code from an external module such as @nanopb//..., I want -isystem to be in use.