13 ms·
The only thing worse than a complex codebase is a complex build system. I think CMake is an abomination. “Hey go learn this new language to compile this other l
by dgfitz 2y ago
The only thing worse than a complex codebase is a complex build system. I think CMake is an abomination. “Hey go learn this new language to compile this other language!”
- gpderetta 2y ago> CMake is an abomination. “Hey go learn this new language to compile this other language!” "go learn this awful new language"
- feznyng 2y agoXmake uses lua if you want to give it a try.
- eadmund 2y agoHe did write ‘awful,’ which is a fair description of the experience of writing Lua. I don’t mean that as an insult to Lua’s creators. They seem like really smart fellows. It’s just that the language is (to my eyes, with my background) viciously ugly. And 1-based arrays, of course, are evil. It has some neat ideas, though, and it is supposed to be very easy to integrate into a project. But man, that syntax …
- wizzwizz4 2y ago1-based arrays are fully optional in Lua. You can use -2-indexed arrays instead, should you wish to.
- wbl 2y agoAh good old $[ in perl.
- feznyng 2y agoI kind of agree, but it's still far better than CMake's custom language IMO.
- gpderetta 2y agoI suspect that INTERCAL would be better than CMake's own language.
- munificent 2y agoThe only thing worse than a complex build system is a simple build system that can't build what you need to build. :(
- dgfitz 2y agoThis means the architecture is also bad, and that is what needs to be fixed.
- almostgotcaught 2y agoso simple huh? since you fancy yourself an architect can you let me know how we might fix the architecture of https://github.com/llvm/llvm-project https://github.com/llvm/llvm-project such that CMake is no longer needed?
- dgfitz 2y agoNot in a glib response, no.
- almostgotcaught 2y agookay can you at least tell me how the architecture of https://github.com/llvm/llvm-project https://github.com/llvm/llvm-project is "bad"?
- db48x 2y agoThat’s such an obnoxious tactic. It’s basically saying “Your point is invalid unless you can cut this Gordian Knot on the spur of the moment in an internet comment!”
- philipwhiuk 2y agoIt's less bad than the ill informed Dunning-Kruger opinion it rebuts.
- tom_ 2y agoI don't mind CMake. It's awful, but I'm already using C or C++, so the bar is set pretty low. It does do a few things right, and at least some of the things it does wrong are manageable. I'll eat at least a bit of shit if it means I can get more than one platform's-worth of build process out of a single set of human-editable configuration files.
- queuebert 2y agoHave you tried meson? I used it once many years ago, and it seemed slightly better.
- ahartmetz 2y agoMeson's approach to simplicity is if you need anything nontrivial, you simply add it to Meson itself. In CMake, you can script it in more cases.
- homebrewer 2y agoDepends on what you need; you can easily call out to external Python scripts to solve many problems, which will work everywhere because Python is needed to run meson itself.
- wrngadsa 2y agoMeson is quite nice if you want to build software exactly and exclusively how the Meson designers want to build software. The world does not work like this though. CMake is weird but once you've learned some non-intuitive stuff, it works very well and there's a reason why pretty much everyone is using it.
- foldr 2y agoI initially tried to use Meson for a small emscripten project targeting WASM, but it seemed stuck on the idea that I was cross-compiling (technically true), and this seemed to make everything more complicated. With CMake I was able to hack together a working build configuration without too much trouble. I just had to tell it that I wanted to use emscripten as the compiler.
- kevin_thibedeau 2y agoThe ideas embodied in modern target-oriented CMake are worthwhile. It's all hobbled by a dreadful script language but that could be improved with sufficient motivation.
- tom_ 2y agoI think what annoys me about it the most is that for every good idea in there there's one piece of tedious crap you have to work around, one actively bad misfeature that doesn't work properly, and one terrible aspect of the awful scripting language. (And two minor annoyances that people determined to hate CMake will never shut up about. But then, if you're determined to hate something, there are worse things than CMake to do it to! So I can't be too critical.)
- eru 2y ago> I think what annoys me about it the most is that for every good idea in there there's one piece of tedious crap you have to work around, one actively bad misfeature that doesn't work properly, and one terrible aspect of the awful scripting language. Sounds like the perfect match for C++.
- cmrdporcupine 2y agoIt's hobbled not just by that but by the fact that it's not the thing doing the building. It's a build system for build systems, and suffers from brittleness and confusion as a result.
- kevin_thibedeau 2y agoMake, in all its various implementations, is far more brittle than CMake. Ninja requires a meta-build tool like CMake.
- dgfitz 2y agoKevin, I must be missing something. CMake can generate a makefile, and this is the usual usecase. So a new language generating a makefile is even _more_ brittle than make, if your assertion is correct.