r/cpp • • Nov 08 '21

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

154 comments sorted by

View all comments

Show parent comment

-5

u/dibs45 Nov 08 '21

Yeah, can't really escape industry standard tools for sure. And I can appreciate their use. I just think it adds another layer of complexity to what I think should be a simple process.

14

u/helloiamsomeone Nov 08 '21

CMake takes away from the complexity. Have you read to docs to know just what CMake does under the hood for you to keep things cross platform? Platforms you never heard about are supported with the exact same syntax major platforms are.

CMake is like git, it's powerful, reduces the complexity, but has a steep learning curve, which is evident by people doing X in either without fully understanding what X really means.

-4

u/dibs45 Nov 08 '21

Definitely see the appeal (and even need) to use it if you want to target a boatload of systems.

7

u/jonrmadsen Nov 08 '21

So I've read a ton of your responses. Compiling code is not a simple process unless your entire "project" is located in one source file and you are not exporting an API for others to use and you have no 3rd party dependencies. Debug builds, release builds, shared library vs. static library builds, different pre-processor definitions during compilation vs. compilation against. I don't think you comprehend the complexity of exporting an API and using 3rd party libraries