首先,在.bazelrc中添加以下内容:
build --compiler_option=-I/path/to/include/dir
其中,/path/to/include/dir应该替换为你实际的包含文件路径。
其次,如果你需要在BUILD文件中使用这些包含文件,可以在BUILD文件中添加以下内容:
cc_library(
name = "mylib",
srcs = ["mylib.cc"],
hdrs = ["//path/to/include/dir:myheader.h"],
...
)
其中,//path/to/include/dir应该替换为你实际的包含文件路径,myheader.h是你要包含的文件名。