-
Notifications
You must be signed in to change notification settings - Fork 967
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
Meson updates #546
Meson updates #546
Conversation
The following features from the CMake build have been implemented: * Library version retrieved from unity.h. * Extension support. * Library, header, and package configuration file installation.
Saw your PR after I submitted mine (#551) and as you clearly know far more about Meson than I do, would you be interested in integrating / improving my change as part of yours? :) |
Not being a meson user myself, I'm not the person to resolve the conflicts between this commit and previous commits. If anyone wants to see this get merged, I'd urge you to take a look... otherwise this is eventually going to get closed from lack of interest. |
Hello @mvandervoord , I would like to get this functionality into Unity as it would be very useful for me. I am going to try to put together a new PR for it based on this (already excellent) work done by @optorres . If this is not the right workflow, then please let me know. |
@amcnulty-fermat -- That sounds perfect. Thank you for picking this up. I know there are numerous people who would appreciate this feature! |
meson_version: '>=0.53.0', | ||
default_options: ['werror=true', 'c_std=c11'] | ||
version: run_command( | ||
find_program('python'), 'auto' / 'extract_version.py', 'src/unity.h', |
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.
You don't need to find python here, because the extract_version.py script is runnable on its own as a regular program (it's executable and has a shebang). On Windows, Meson will scan the shebang and detect that it needs to be run with python.
build_fixture = get_option('extension_fixture').enabled() | ||
build_memory = get_option('extension_memory').enabled() |
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.
You're just using these like booleans, it seems misleading to allow people to specify either =auto
or =disabled
and have auto really just mean disabled.
What about defining the options as type boolean, and just checking the option value directly?
This updates the meson build scripts to bring them more-or-less up to parity with the CMake script and adds a meson build script to one of the project examples.
Build script additions:
unity.h
instead of being left as undefined.fixture
andmemory
) are now supported.pkg-config
instead of CMake's config format) are now installed withninja install
/meson compile install
.