3 ms·
CMake solves the problem of not crafting Makefiles manually. It's far from ideal, but it's better than the things it tried to replace. The only alternative that
by jeroenhd 4y ago
CMake solves the problem of not crafting Makefiles manually. It's far from ideal, but it's better than the things it tried to replace. The only alternative that tried to solve the same problem around the same time is MSBuild. I'm not necessarily against MSBuild (GUI support is worlds better at least) but I think we've all seen enough XML in our lives already not to switch to that for our build system.
CMake looks confusing because of its many predefined constants/variables/methods, all in SHOUTY_CASE but once you get past that, it seems to me like it's Good Enough™.
I think Meson is better than CMake in terms of syntax but it's not as popular (yet). It doesn't fix all the criticisms this article brings up but I found it nicer to work with.
If that doesn't suit you, you may like to look into Gradle; unlike CMake and friends, it doesn't invent a new programming language for its compilation, instead repurposing the Kotlin language for making dynamic build scripts. A very powerful setup if you want that level of the customisability.
- mathstuf 4y agoIME, almost no one needs arbitrary build DAG power. And if they get it, it gets tangled up over time. Even with CMake, I end up having to bring back "fraying" code over time to keep things sensible on the projects I maintain. Too many "what's wrong with this one exception to the rule?" cases that end up causing a mess if they're not kept under control. I liken it to software processes and "research" code. Researchers are focused on their task at hand and things like TDD, sensible commits, releases, refactoring, not using magic numbers, etc. are all put to the wayside in the pursuit of their actual goal. "Regular" developers are very similar when it comes to their build systems and being "too creative" there is just as harmful. FD: CMake developer