2 ms·
> If a lot of functions is a code smell, then the problem is with the language. Let me kindly disagree :). You do not use a build system to write a complex pro
by palata 4y ago
> If a lot of functions is a code smell, then the problem is with the language.
Let me kindly disagree :). You do not use a build system to write a complex program, you use it to call a compiler.
You could run your compiler manually, but it doesn't scale. You could write a shell/python/lua/etc script that scales better, but nobody else will know it (and chances are that nobody will want to learn about it).
By using a build system (autotools, cmake, meson, gradle, ...), you agree to use a standardized API to call your compiler. It doesn't really matter what API it is; what matters is that it is standardized: once you know it, you can build all the projects that use it.
Now it is true that CMake projects are often a mess. Either because it's used incorrectly, or because it's doing a lot of magic with custom functions (and therefore it looks more like a custom shell script than a CMake project).
Do I mean that CMake is perfect? Certainly not. But it doesn't suck either. And I see a whole lot of criticism coming from people who write messy CMakeLists. For a criticism to be constructive, it has to be informed.