-
Notifications
You must be signed in to change notification settings - Fork 257
libcbor: add 0.13.0 #2392
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
base: master
Are you sure you want to change the base?
libcbor: add 0.13.0 #2392
Conversation
b414921
to
a3aeca7
Compare
a3aeca7
to
c198457
Compare
|
||
cc = meson.get_compiler('c') | ||
|
||
tests_opt = get_option('tests').disable_auto_if(meson.is_subproject()) |
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.
Why disable if it's a subproject?
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.
If the tests are left enabled in a subproject they'll all be built when running ninja install
, which can be time consuming or at worst lead to build failures on stranger build configurations.
|
||
foreach path : tests | ||
name = path.split('/')[1].replace('.c', '') | ||
test_exe = executable( |
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.
Also use build_by_default: false
.
This means you can also skip checking if the build is a subproject. The tests won't be built when including libcbor as a wrap, even if the testsuite is enabled -- they will only be built when running meson test
.
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.
Unless im mistaken targets with build_by_default: false
will still be built during ninja install
or equivalent, which can slow down builds a fair amount or lead to build failures. I really prefer to keep tests behind a feature for this reason.
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.
Unless you add install: true, they won't be built.
That being said, it's pretty common to have a yielding feature tests option. I just don't like it behave differently when it's a subproject.
c198457
to
f893fe4
Compare
Adds version 0.13.0 of libcbor