bazelbuild / bazel-gazelle

Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.18k stars 374 forks source link

How use bazel-gazelle in cpp project? #910

Open roderick-liu opened 3 years ago

roderick-liu commented 3 years ago

hi It is a very useful tool in golang project. Does it been used in cpp project?

jayconrod commented 3 years ago

There's no native support for C++, but you could write an extension (see https://github.com/bazelbuild/bazel-gazelle/blob/master/extend.rst).

HALtheWise commented 3 years ago

@roderick-liu I may be working on a C++ Gazelle extension soon, if you are interested in collaborating.

dhanna11 commented 3 years ago

Is it possible to get some info about any c/c++ build file generation that Google already has? I’ve seen references to an unsupported “googlify” script that you can run on code checked into third_party.

I suspect a c++ extension won’t be remotely as straightforward as Go’s build system was heavily influenced by Blaze 😰

roderick-liu commented 3 years ago

@HALtheWise

hi Do you want to build tools for c++?

dhanna11 commented 3 years ago

Some members of the Bazel team have been working on AOSP support for some time: See https://android-review.googlesource.com/q/owner:jingwen%2540google.com, https://blog.bazel.build/2020/11/12/aosp_migrating_to_bazel.html, and Bazel's undocumented native ninja rules: https://github.com/bazelbuild/bazel/tree/master/src/main/java/com/google/devtools/build/lib/bazel/rules/ninja

nnWhisperer commented 1 year ago

Hello, I came here after seeing a recent BazelCon video, https://www.youtube.com/watch?v=ol5hwjr48Q4 where the presenters share that they added gazelle rules for c++ and hence facilitated developers' overheads in their project, which is great. I searched online but couldn't proceed further. Are there any updates on this thread, i.e. have you managed to proceed? Thanks

disdi commented 1 year ago

Any update on C++ Support?

pieknik commented 1 year ago

@disdi @HALtheWise @roderick-liu My team is interested in the c++ extension as well. Would anyone be interested in a collaboration? If so I'll submit a new issue saying we'll (attempt to) add it

albertocavalcante commented 11 months ago

Is there any place where I can find more about ongoing efforts on this?

Gazelle for C++ would be great. If anyone already started working on it I'd love to take look.

pieknik commented 11 months ago

hey alberto our team actually went ahead and created a decent mvp for c++, Going to start working with my company to OSS the solution - we've gotten pretty efficient so it shouldn't take long

mpatou commented 11 months ago

Hey @pieknik can you publish your MVP somewhere ? I would be curious to see if/how it works.

lpulley commented 8 months ago

I found that video too, @nnWhisperer, and I had the same question. @pieknik have you had any luck getting the MVP open-sourced?

peakschris commented 2 months ago

@pieknik +1 :-)