Here's an unordered list of things that are nice to have in a build system:
- Automatic inclusion of new .cpp and .hpp (or .h) files into pool of compiled files
- Makes #include statements just work
- Works on most systems without having to install an outrageous amount of dependencies (for the build system anyway)
- Makes inclusion of external libraries (outside the project folder) easy
- Allows division of code into internal libraries for faster compilation (only recompile what changed)
- If there is any boilerplate at all, makes it clear what is necessary
- Effort to configure the build of a project scales with the amount of features used, not with the amount of code to compile, especially with nested folders
I have tried mostly cmake and scons so far. The latter feels like a version of the former that makes some things more convenient, but isn't all that different. cmake meanwhile is definitely a step up from writing Makefiles manually, but it's a far cry from things like Rust's crates. I feel like I could do anything I need with cmake, but it does not make things easy.
There are probably solutions for any problem I might encounter, but these do not feel like clean programming practices. For example, automatically including new code files requires writing some recursive globing-loop inside cmake's description language, which of course I didn't write myself and instead copy from other projects. If that is the best solution, why isn't this part of cmake itself?!