-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add meson build file #106
Add meson build file #106
Conversation
Includes support for installing headers and running tests
Thanks for this pull request, @v1993! I'm not familiar with Meson, so please give me some time to get acquainted with it, and I will then incorporate your build file into the project. |
Update: Unfortunately I did not yet have time to incorporate this PR in v3.5.0, which was released today. However, compatibility with the meson build system is now on the top of my TODO list for the next release. I just need to find some time to familiarize myself with the system first. Meanwhile, I am closing this PR, since it is on the fast track to be incorporated in the next release - but please keep the branch open. Thanks again! |
Sure! In the meantime, I'll be maintaining build files over at meson wrapdb. They are slightly newer than what this PR contains anyways, including an option to disable building tests and do so automatically on macos due to missing quick_exit in its libc. Those can be incorporated into upstream project with no to minimal tweaking. |
Sounds good, thanks! I'm surprised macOS doesn't implement |
I'd personally go for not using P.S.: I'd appreciate if |
Yes, I'll probably use In the next release I plan to change all the enable/disable flags to command line arguments, so that should take care of your second request :) |
I'm pretty sure
Ah, that also works. Thanks! |
|
Well, most importantly, For scripting purposes and generally machine-interpreting test results I'd personally look into using TAP, which is pretty trivial to implement without relying on third-party libraries and has a plenty of harnesses, including one built into meson. It's also rather human-readable. |
Here are build files updated for version 3.5.0: mesonbuild/wrapdb#1032 (that PR doesn't touch |
Thanks! So since I don't know yet how meson works, it is possible to just update mesonbuild/wrapdb without adding any files to my repository (which is how I maintain the vcpkg and conan integration, and my preferred option since I don't like adding too many files to the repository), or do I have to add the files to my repository otherwise it won't work? |
Sure, that already works (meson's wrap system literally copies files into project's folder during build), although IMO it would still be beneficial to have it upstream for ease of building and running tests (once project is configured, |
Finally, it would probably be a good idea to include a note about being available as meson wrap. Something like: Installing using MesonIf you're using Meson build system, this package can be used as a wrap available from WrapDB. To do so, run
Afterwards, calling
|
Thanks for the information. I have my own test program, and it's good enough for my purposes, so for now I don't see a reason to include the meson files in the GitHub repository (just like I don't include any files for vcpkg or conan). For the next release, I will first spend some time learning how to use meson myself, and will then add information about how to use the package with meson to I can also take over updating wrapdb whenever a new version of the thread pool is release, like I do with the other package managers. That will ensure it's always updated as soon as possible. Thanks again! :) |
FWIW, meson isn't comparable to vcpkg/conan, but rather comparable to GNU autotools, or cmake. All 3 tools allow you to:
vcpkg and conan and similar tools usually run meson/cmake/autotools to install the headers and pkg-config interface descriptions into their own managed library directories. They add a layer on top of meson/cmake/autotools. And meson and cmake, but NOT autotools, allow other projects to:
This blurs the line between a build tool and a package manager, because meson/cmake are intrinsically the former but can do a lightweight form of the latter. ... Projects that provide header-only libraries often feel much less motivation than projects that produce compiled static/shared libraries, to do without build systems -- "simply copy the header into your own sources". But it really is a separate issue from the topic of package managers. Also IMHO that misses the topic of pkg-config files for providing named dependency interfaces. |
I see, thank you for the detailed explanation. Like I said, I'm not familiar with meson, so I'll have to spend some time learning what it does and how to use it before the next release of this project. |
Pull request policy (please read)
Describe the changes
Add file for meson build system. It makes running tests easier, i.e.
will run tests both for normal and light versions. It's also possible to use meson's coverage reporting support to get detailed information about test coverage.
Finally, this makes including this project into meson's warpdb trivial. The only maintenance burden is having to update version when new release is made.