Everything You Never Wanted to Know About CMake
CMake is awful, and the fact that the C++ community seems to be settling around it will be a massive disadvantage in the long run. Why do you think so many WASM examples use Rust? It&#x27;s because Cargo is a sane build system that makes cross-compilation easy.<p>Issues with CMake:<p>- The DSL is not very good. It needs proper functions, for one.<p>- Non-hermetic builds (also mentioned in this thread)<p>- No ability to easily query the build DAG<p>- Headers are not modelled properly (they should be a dictionary of paths -&gt; paths, not a list of include directories)<p>- Build folders cannot reliably be used between configurations, leading to confusion and cache misses<p>- Everything is convention driven. It does not model the build graph properly.<p>- Globs do not work properly (maybe that has changed recently?)<p>- The cache is not portable across a network, or even between folders on the same machine<p>The C++ community deserves better!<p>Others in this thread have mentioned some modern alternatives:<p>- Buck Build (Facebook, Uber, AirBnB)<p>- Bazel (Google)<p>- Pants (Twitter)<p>- Please (Thought Machine)<p>It doesn&#x27;t actually matter which of these succeeds. They all model the builds in such a way that you can easily transpile between them.