[WIP] Meson build system #397
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since CMake has too many problems to list and Autotools doesn’t really integrate with anything, I decided to port most of the Autotools build system to Meson. This includes maintainer mode. I did not touch any existing files other than for the commit that removes CMake, so this is not as clean and simple as it could be.
The genfft part deviates a bit from Autotools by using (requiring) Dune, which will download and compile known-working versions of the OCaml toolchain and any required packages as necessary.
See
README-meson.mdin the top-level directory for more information.Tested
On openSUSE Tumbleweed:
Targets
GCC 15 with glibc except as noted. Cross-compiled builds were tested by running the
benchprogram through a few cases using QEMU binfmt wrappers or WINE and making sure it also picked a few SIMD code paths.Environments
Other
On Windows 11:
MSVC cl 19.50 / link 14.50. Other than MSVS 2026, only Meson and Ninja were installed using the MSI package from Meson’s Release page. No WSL or other external dependencies.
Static library build only because we’re not explicitly exporting some internal symbols that are needed to dynamically link threads/omp/mpi libs and tools to the main library. But yes, it basically works with MSVC-style toolchains as well. Was easier than I thought, too.
Targets
Environments
I also wanted to test some BSDs but didn’t get around to it yet. As for macOS and other Apple targets, Meson does have an Xcode backend, but I was unable to test it because I do not have a Mac and my aging travel laptop took more than half an hour just to boot a macOS VM (it really is not meant to run on anything but Apple hardware). Help is appreciated.
To Do
These are required to reach feature parity with Autotools:
Bonus features: