Hi,
I'm trying to integrate Bazel into an existing repository that uses
CMake and <angled> includes. We'd prefer to maintain the angled
includes within the library. However, I'm not sure whether
that would work with the rules I have here:
cc_library(
name = "foo",
hdrs = glob([
"foo/**/*.hpp",
]),
copts = foo_COPTS,
defines = FOO_DEFINES + [
"FOO_A=1",
"FOO_B=0",
],
include_prefix = "foo",
linkstatic = True,
strip_include_prefix = "foo",
visibility = ["//visibility:public"],
)
While this works for the users of this BUILD.bazel rule,
it causes an error when the library author attempts to compile
the library. The error produced is as follows:
test/a/b.cpp:N:M: error: 'foo/meow/cat.hpp' file not found with <angled> include; use "quotes" instead
Essentially, Bazel library users can use the library, but the library maintainer
cannot unless we switch entirely to using quotes. Is there an easy fix for this?
How does one attempt to use <angled> brackets within the library
but still cater to external users who wish to use Bazel?
Thank you. :)
Cheers,
Y.