ion-c icon indicating copy to clipboard operation
ion-c copied to clipboard

Consider using Meson as a build tool over CMake

Open sadderchris opened this issue 3 years ago • 0 comments

While ubiquitous, CMake is a rather baroque build system. It's configuration DSL is not very ergonomic nor easy to work with, and it's frustrating to debug configuration issues. It has surprising defaults and there are often multiple ways to accomplish things, making it difficult to determine how things are being configured. Case in point: I spent a good chunk of yesterday trying to figure out why setting CMAKE_C_STANDARD to 11 wasn't actually building ion-c with C11 enabled - turns out the C standard that is used is overridden in each subdirectory.

Meson claims to be a fast and user friendly build system. Quoting their main page:

The main design point of Meson is that every moment a developer spends writing or debugging build definitions is a second wasted. So is every second spent waiting for the build system to actually start compiling code.

Meson has broad platform support, is well supported in various IDEs, and is well documented. It claims to be faster than make-based build tools.

Here's a comparison with other similar build tools.

I think it would at least be worth looking into using Meson to simplify how we build ion-c.

sadderchris avatar Jan 15 '22 00:01 sadderchris