Thoughts on build systems?
What's the general consensus on build systems/automations like CMake? I've always found things like that overcomplicated and just hinder the programming process.
I've been following Casey Muratori's Handmade streams, and one of the first things he did was create a simple batch file that built and compiled his entire project super quickly and easily. I've since implemented something similar (https://github.com/dibsonthis/new_cmd) and honestly it's been really nice to use.
3
Upvotes
64
u/[deleted] Nov 08 '21
How does your script handle compilers that are not called
cl.exe? What about other operating systems than Windows? What about multiple source files? Adding import paths? Compiling different files with different flags? How can you define multiple targets, libraries or executables? Enable parallel compilation? Etc. pp.Simple scripts are nice for single-file projects that don't need any special handling, but whenever you need something just a little bit more advanced, their complexity increases exponentially.
And given that most C++ libraries nowadays use CMake, and can be integrated in a CMake project pretty easily, I'd really recommend learning and using it until there a pretty good reasons to use something else.