4 ms·
I'm not sure I agree with the complexity. You can go read CMake's and Meson's source code and probably agree with me it's not very trivial. Sure they can provid
by Cloudef 6y ago
I'm not sure I agree with the complexity. You can go read CMake's and Meson's source code and probably agree with me it's not very trivial. Sure they can provide you a "cross-platform" build with ease, but it doesn't come free. You are giving away flexibility and it only works when it works. When it doesn't work you usually have to employ ugly hacks or your build files start to creep in way more complexity than would be needed with native solution, or even by using a simple Makefile or heck even a shell script. In worst case, you'll become a CMake or Meson developer to add that missing functionality, or fix bugs whatever, just to get your thing to build.
I also want to point out that the build system isn't just for you, it's also for the users and packagers. Especially for packagers it's important the flexibility is there.
I used to use CMake myself a lot way back as well, but eventually got fed up with its problems it always caused (mostly when other people tried to package my projects and there was always some incompatibility or dependencies not being linked correctly, etc...).
I also used to think Makefiles are bad, but actually when I sat down reading the GNU Make's manual many things clicked with me, and (GNU) Makefiles are actually very good at building stuff and they aren't that complex at all. Sure there's lots of bad Makefiles around the internet (just like there's also bad CMakeLists) the Makefiles are very powerful when written correctly, and most importantly they are very very fast.