-
Notifications
You must be signed in to change notification settings - Fork 183
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
cppzmq: new wrap #545
cppzmq: new wrap #545
Conversation
cc021f9
to
4ce9029
Compare
@eli-schwartz @jpakkane can we merge this already? I've made some progress on libzmq (https://github.com/stephanlachnit/libzmq/tree/p-meson), but it selecting the correct option will take some more time. Doesn't block cppzmq though as it works fine with system libzmq. |
Sorry, I forgot to look at it because I assumed that you were going to be updating the PR to also wrap zeromq. I think you should install zeromq for macOS via |
4ce9029
to
5a93847
Compare
Good point
Build the tests, could also add the examples. Looks like the CI doesn't take catch2 from wrapdb, how do I do this? Is there some kind of preferred way to enable testing in meson? I think when using cppzmq in a subproject, the tests and examples should not be build by default. |
Just add a meson_options.txt with a tests feature option, and use that as the required kwarg for catch2. If it is required, then it will be picked up via wraps, wrap fallbacks don't automatically get used for optional dependencies. (There's a kwarg to allow fallback anyway.) |
Ah right, I see. But then the feature would have to be enabled by default for this to work, right? A bit offtopic, but maybe meson should add a builtin tests bool? That could be disabled for subprojects by default, but e.g. here in the CI enabled via cli. |
That wouldn't make much sense. Note that you still have to run ninja tests or meson tests to get them to run. A simple compile does that but does not run or install them. |
I disagree, tests should only be compiled if wished by the user (developer vs user). Sure, enabling them by default is a good default, but having a default way to not compile tests is something useful. It might not make a difference here, but if you have a giant testsuite containing maybe hundreds of files, it can take quite a while to compile.
Sure, but I have my own tests defined, I don't care about tests from the subproject - possible test failures have nothing to do with my project. |
Actually, this shouldn't be an option, and enabling to compile them by default is a pointless waste. It's just a bug in Meson that currently, What should happen is you mark every test executable to not build by default, but it's fine to unconditionally define their rules. Running This works fine in most cases, though if the tests require additional dependencies then it's probably desirable to have an option for that. |
Ah thanks! This seems like a good idea - but there is still the subproject problem. But this should be fixable with an option for |
|
Thanks! |
dc152c6
to
6e933f4
Compare
Added tests and examples with
Did that, it still is not picked up by the CI when left on auto. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ci_config.json can pass -Dcppzmq:catch2=required
as build_options for this wrap. This will guarantee fallback happens.
It's also possible to use dependency(..., allow_fallback: true)
but that bumps the minimum version of Meson from 0.47.0 to 0.56.0
537a78e
to
ce5347e
Compare
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
ce5347e
to
bf026ed
Compare
|
@eli-schwartz any more objections or can this be merged? |
This currently still requires libzmq, which I will add as wrap hopefully soon.