Hacker News new | ask | show | jobs
by kova12 973 days ago
There isn't one for c++ unfortunately
1 comments

Don't know what qualifies as a Scotsman to you, but CMake is more modern than Makefile.
Yep, CMake. It has a weird string-typed syntax, and an even weirder function/function parameter syntax, but those are the most egregious issues.

Target-based CMake is extremely straightforward to get started with, and CMake + Ninja is also frequently significantly faster than the alternatives (autoconf tools). It also easily hooks into package managers for C++ (Conan, vcpkg) and today, users can write C++ like they do JS or Rust: have a `vcpkg.json` file, top-level `CMakeLists.txt` file, and that's it.

I've worked enough with Autotools to understand how ridiculously painful they are. Look at this monstrosity[1].

CMake may be hard to get started with, but it's easy to append, maintain, and refactor code that builds with CMake.

[1]: https://en.wikipedia.org/wiki/GNU_Autotools#/media/File:Auto...

Don't use make! Use a makefile generator!

(hope the sarcasm is obvious)

CMake is pretty good, so is Meson, so is Conan. All of them have some unfortunate shortcomings that make the C++ ecosystem hard to work in, but the biggest problem is diversity of build systems for dependencies.

XMake is by far the best option. There is nothing even close in feature completeness, nor in user friendliness.