mp-units icon indicating copy to clipboard operation
mp-units copied to clipboard

Bazel build system support

Open Attempt3035 opened this issue 5 months ago • 3 comments

Hi all! I'm curious if any one has looked at adding support to build this with bazel or even add it to the bazel central registry? It might not be relevant if this will ultimately become part of c++29, but I'm guessing it will be quite some time before that is finalised and available with compiler support, so wondering anyone's thoughts! If it's not going to be nightmareish hard, I might give it a crack!

Attempt3035 avatar Feb 04 '24 02:02 Attempt3035

I must admit I am not the biggest fan of Bazel. It is not a typical build system. If it was, CMake would have generators for it already, and no additional effort would be needed.

I wouldn't like to support specific build systems in this repo because, among others, it forces us to test those in our CI. If we start doing it, we will end up with plenty of build scripts for various tools here. We use CMake exactly to prevent this issue.

Said that it seems that Conan has Bazel generator that could be used to generate all files needed by Bazel easily.

mpusz avatar Feb 05 '24 10:02 mpusz

Of course, there is a chance that I am wrong and we should consider adding direct Bazel support as an exception. But for this, I would like to hear a bit more rationale for it.

mpusz avatar Feb 05 '24 11:02 mpusz

Ahh okay! I guess I've very much liked the simplicity of Bazel for projects, it turns out a lot tidier than cmake in my experience, but totally makes sense not to try to support individual build systems. Very interested in the Conan Generator though, will definitely give that more of a look in my spare time. If it's easy enough to get up and running, I might set it up in the BCR using a patch file so nothing bazel related needs to be in this repo but it's still easy to include in bazel projects. We will see!

I guess it's just as much of a question as to why we wouldn't add buck2 or other build systems. I personally like using bazel and consider the fact that the repo could be added straight to the BCR for super easy use great, but that doesn't really justify it as being worth adding to the repo and maintaining it. Just a nice to have in my opinion🤷‍♀️

Attempt3035 avatar Feb 05 '24 11:02 Attempt3035