-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add support for Bazel #2505
Add support for Bazel #2505
Conversation
Thanks for the PR. I don't think we should put these build files in the top-level directory but if they can be moved to the support directory where we already have gradle files, I'll be happy to merge. |
Bazel requires that the The The The If you want to keep the number of files in the root folder minimal I can easily delete A different approach would be to move the Having the I see three options:
What option do you prefer? 1, 2, 3? |
I prefer going with option 3. One extra step to copy build files is not critical and keeping the project directory clean is important. |
Ok, I changed everything to option 3. I also found a way to use the current state out of the box with Bazel. Details about this can be found in the provided README.md file under section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few IMHOs, feel free to ignore 😉
Added changes as requested. Header-only version is currently not part of this. Can be one of the next steps. |
Thank you |
Goal of this PR
This PR helps users of the Bazel build system to integrate
fmt
into their builds.Supporting two build systems (CMake and Bazel) is of course more effort to maintain but helps to spread
fmt
.In the worst case the Bazel build does simply not work - in the best case, someone who uses Bazel can benefit from it.
Also, other projects support CMake and Bazel side by side (e.g. Catch2, GoogleTest, OpenEXR, oneTBB etc.)
Demo
A Demo of how to use this can be found here.
Everything a user has to do is:
Create a
WORKSPACE.bazel
file with the following content:Create a
BUILD.bazel
file and add a dependency to fmt:Make use of fmt in
main.cpp
:Tested with: GCC 9.3.0, Clang12, MSVC 2019
Support
I am willing to support the Bazel build support of
fmt
for a half year - after this period I can reconsider doing it for another half year