Hacker News new | ask | show | jobs
by thechao 2031 days ago
I feel like everything you just said is true if you replace “cmake” with “make” and “xmake” with “cmake”.
1 comments

Supporting gcc/clang and msvc with raw make is a pain. That's basically the number 1 CMake value add.
I would add that cmake is a makefile generator.

cmake's value is in the way it provides a high-level abstraction over all supported platflom's capabilities, and that it works by generating and running build scripts from lower level systems such as standard make.

For example, Cmake allows us to set the version of c++ a project uses with a single build target property, which is then used to pick which compiler's flags it uses with a given compiler. It then generates the makefile with all the relevant flags set, and runs that with ease.

This works regardless of platform or compiler.

I agree separating the domain knowledge (CMake, Meson, etc.) from the build plan executor (ninja) is extremely good too, but one must be fair this isn't itself end-benefit to users.

If good architecture was an immediate end-user benefit, we'd get a lot less bad architecture from short-sighted institutions writing code!