4 ms·
>I think cargo is better than cmake That is an understatement. I can't think of a build system that has spawned more attempts to find something better than CMa
by tux3 11mo ago
>I think cargo is better than cmake
That is an understatement. I can't think of a build system that has spawned more attempts to find something better than CMake has.
There have been so many people trying to make their own C/C++ build system and/or package manager out of sheer spite for CMake that it's frankly hard to keep track.
In fairness to them and to CMake, it's not a simple problem to solve. To truly know CMake is to wish you didn't, that way someone else would have to maintain it.
- bluGill 11mo agoYou seem to forget about autotools. Cmake is ugly but I'll take it over autotools.
- danudey 11mo agoAs an end user: at least with autotools it's easy for me to see the available configuration options with ./configure --help in a nicely readable way. cmake has -LAH but it's still... kind of awful. At least it knows how to use ninja though.
- bluGill 11mo agoProblem is autotools doesn't work when cross compiling - the options are there but there is always something wrong, and it isn't easy to fix. cmake can at least get that right. Note that I cross compile a lot of code so this matters to me, if you just do the common thing autolools might work - but make would as well then.
- josephg 11mo agoYeah; generally I find CMake rules are much easier to read and modify than autotools and makefiles. With Makefiles there’s about 18 different ways to write a rule to compile something, and I find I need to go hunting through a bunch of files to figure out how this makefile in particular defined a rule for compiling this C file in particular. CMake is much higher level. I can just see all the higher level targets, and how they’re built. Then - orthogonally - I can modify the build system that CMake uses to compile C code. It makes a lot more sense. But I’d take cargo over any of this stuff. Cargo means I don’t have to think about compiler flags at all.
- apitman 11mo agoIf you find yourself doing a lot of cross compiling C check out the Zig build system.
- bluGill 11mo agoI am not going to rewrite the build system of a third party library.