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.
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.
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.hinstead of being left as undefined.fixtureandmemory) are now supported.pkg-configinstead of CMake's config format) are now installed withninja install/meson compile install.