Meson 1.3 is now out with new features and enhancements. If you are a Linux developer and frequently compile projects then you should check out this release.
Meson is a Python-based build system licensed under Apache 2.0. Designed with a focus on speed, convenience, and user-friendly development, Meson replaces the traditional make utility with the Ninja toolkit by default. It is widely used by mainstream open-source projects like X.Org Server, Mesa, Lighttpd, systemd, GStreamer, Wayland, GNOME, and GTK.
Meson 1.3 Highlights: What’s New?
Here’s a brief rundown of the new features & updates of this release:
- Stricter Code Checks: Meson now allows you to treat compiler warnings as errors with the addition of the “werror: true” option in compiler checks.
- Enhanced Preprocessor Symbol Checks: The new has_define method lets you check symbol definitions by the preprocessor.
- Configure Files Made Easier: The configure_file() method gets an upgrade with the addition of a macro_name parameter and support for JSON output.
- Advanced Language Options: Meson now supports lists of values for c_std and cpp_std parameters, providing more flexibility in language options.
- Customizing Ninja Output: Customize messages output by the Ninja utility in modules using CustomTarget to process files.
- Deprecation Alert: The build_target “jar” is now deprecated, and the “jar()” call is recommended instead.
- Environment Variable Control: The ‘env’ parameter is now available in the generator.process() method to set the environment variable for input processing.
- Executable Suffix Support: You can now specify suffixes when naming build targets associated with executables.
- Introducing “fill” Parameter: The int.to_string() method now includes a “fill” parameter for incrementally filling strings with leading zeros.
- clang-tidy-fix Target: A new build target, clang-tidy-fix, specifies running the clang-tidy utility with the “-fix” flag.
- Suffix for Build Targets: Specify a suffix (TARGET_SUFFIX) for the build target in the compile command.
- Cache Control: Manage your package cache with the MESON_PACKAGE_CACHE_DIR environment variable and the “meson setup –clearcache” option.
- Compiler Check Improvements: All “has_*” compiler check methods now support the “required” keyword.
- Rust Development Enhancement: A new keyword, rust_abi, is added for improved control in shared_library(), static_library(), library(), and shared_module() functions.
To learn more or grab the latest Meson source, visit the official GitHub repo.