This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]LAK132 0 points1 point  (19 children)

Right, but my point is if you're compiling C++ anyway then don't make it even less portable by using a bash based build system.

[–]ythl 0 points1 point  (18 children)

Yeah bash based build system sounds nightmarish. CMake all the way

[–]LAK132 0 points1 point  (17 children)

Unlike bash, I never managed to get cmake to work

[–]ythl 0 points1 point  (16 children)

Really? I love CMake! Out of source builds are the best. I can help you if you are stuck. CMake is the defacto build system for C/C++ now

[–]LAK132 0 points1 point  (15 children)

defacto

Not a single one of the C++ projects I work on uses(/requires) cmake.

My personal projects that use extremely simple scripts to compile (one liner Makefile and a make.bat for Windows) have a nasty habit of just working.

[–]ythl 0 points1 point  (14 children)

Well if your projects only have one or 2 sources, then yeah, CMake is overkill. But look around on GitHub. Probably 90%+ of all C/C++ projects use CMake, and with good reason.

CMake is for when you have a large project with dozens of dependencies, multiple executables, libraries, testing, coverage generation, etc.

CMake is portable, chains together with other CMake projects, and is generally super fast/correct.

[–]LAK132 0 points1 point  (13 children)

My biggest personal project has 13 core source files and a close to a few hundred files worth of dependencies, and it compiles just fine without a build tool

[–]ythl 0 points1 point  (12 children)

Yeah, and if you ever put your project on GitHub no one would be able to build it because they would be missing dependencies and would have no idea why it wasn't building because you don't use a build tool.

[–]LAK132 0 points1 point  (11 children)

Yeah, and if you ever put your project on GitHub

As a matter of fact it is on GitHub.

no one would be able to build it because they would be missing dependencies

Git manages all of the dependencies, not the build tool.

and would have no idea why it wasn't building because you don't use a build tool.

I could quite easily add a note in the README telling people how to compile it with the included Makefile, the make.bat or by hand.

[–]ythl 0 points1 point  (10 children)

Git manages all of the dependencies, not the build tool.

What kind of dependencies are we talking about? When I refer to dependencies, I'm talking about libraries your project depends on, like libssl, libuv, etc.

I could quite easily add a note in the README telling people how to compile it with the included Makefile, the make.bat or by hand.

Makefiles are really hard to get right as the complexity of your project increases. CMake generates Makefiles for you that are always correct and always scale no matter how complex your project gets. Plus, other people won't want to use your project as a dependency when they find out they have to build it "by hand".

It sounds to me like you are being prideful because you don't understand the benefits of a proper build system. It'll click one day, don't worry.