最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How can I include build warnings from header files loaded in Bazel modules? - Stack Overflow

programmeradmin2浏览0评论

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

In the example above, 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.

发布评论

评论列表(0)

  1. 暂无评论