Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] cc_libraries should use "includes", not "strip_include_prefix" #1512

Open
carlosgalvezp opened this issue Nov 16, 2022 · 3 comments
Open

Comments

@carlosgalvezp
Copy link

So that when users import google-benchmark, the headers are included as "system headers", instead of regular headers.

If this is not done, compilers will throw warnings at google-benchmark code, which users have no way to act upon. Users should be able to choose a highly restrictive set of warnings without having to fix them in google-benchmark.

Note that this pattern is already applied in the googletest repo.

@varshneydevansh
Copy link
Contributor

Is the below discussion related to the above issue?

Bazel "strip_include_prefix" or "includes" attributes in cc_import rules suggested solution in this thread -

  1. Support "strip_include_prefix" or "includes" attributes in cc_import rules bazelbuild/bazel#4748 (comment)
  2. Support "strip_include_prefix" or "includes" attributes in cc_import rules bazelbuild/bazel#4748 (comment)

I would like to work on this after completing my pending PR.

I went on reading what strip_include_prefix is?

  • Functionality of the "strip_include_prefix" function provides a way to remove a specific prefix from a string.

@carlosgalvezp
Copy link
Author

Hi! No, those links are related to cc_import, while I'm referring to cc_library in this ticket :)

@varshneydevansh
Copy link
Contributor

varshneydevansh commented Jul 14, 2023

Yes that bazel issue is about cc_import but the workaround for that and with the cc_library they used includes instead of strip_include_prefix. So, I found it a good starting point.

I am looking more into this. https://groups.google.com/g/bazel-discuss/c/pQLmBVNJGZ4?pli=1

googletest BUILD.bazel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants