cpp_weekly icon indicating copy to clipboard operation
cpp_weekly copied to clipboard

A tour of build systems

Open paulherman opened this issue 3 years ago • 2 comments

Channel

C++Weekly

Topics

I think it'd be great to outline the build systems that are more widely used with C++. As far as I am aware there are already episodes on CMake and how to use it with package managers. It'd be nice to compare that with other well known systems (meson, bazel) on a uniform project (say a program that creates an empty window based with a single dependency such as glfw - this was fairly simple to set up in all of them).

The reason for the idea is that build systems and package managers are one of the more difficult steps when entering the world of C++, unlike other languages where there is an "official" toolchain that most projects usez

Length

I'd say either long form if a single episode or bite sized if one episode per system.

paulherman avatar Oct 23 '22 10:10 paulherman

I often use good old Make. (But then again I have lots of experience with it and its quirks and pitfalls.) Might be helpful to people unfamiliar with it to at least know how it works in case they end up dealing with it.

And, it's possible to write/hack vcxproj files by hand and use MSBuild to build, which you might need to do occasionally.

Build2 looks interesting, haven't tried it out it in a while, might be improvements since then...

reedhedges avatar Dec 07 '22 14:12 reedhedges

I'm also interested in this. I'm just in the midst of migrating our company's build from cmake+conan to bazel (bzlmod) to benefit from ultra fast builds that are enabled with Bazel's caching and remote building support. I also like that Bazel strictly manages toolchains so that accidental build failures and "works on my machine" scenarios are avoided due to toolchain hermeticity. Additionally, bzlmod makes it very easy to integrate various open source c++ packages, which makes bazel also a package manager - IMO better one than vcpkg or conan.

I'd really like to see an episode that discusses using Bazel for C++.

There are also a lot of bazel c++ starter templates, whereas this one appears to be most modern using latest things recommended by Bazel.

DoDoENT avatar Nov 25 '25 20:11 DoDoENT