Expose `Environment::get_build_command()` to meson.build
See original GitHub issueHi,
As part of the build generation I would like to generate tests / scripts that in invoke meson. One example is generating a script that runs DESTDIR=/sometemp meson install
and then runs tests against that temporary installation. I can’t just use find_program('meson')
because meson may not be on PATH
or the meson on PATH
isn’t the same as used in a build directory.
I obviously can just invoke ninja install
in such scripts / tests, but that will not work in case a different backend is used. Hence the desire to expose get_build_command()
.
Would a patch adding that feature have a decent chance of getting accepted?
A second, less crucial, use-case for this is that I would like to generate a script that uses meson introspect + knowledge of the source-tree to compares - and optionally resyncs - the list of tests existing in the source tree and the tests that the corresponding meson.build knows about.
get_build_command()
effectively already is exposed via MESONINTROSPECT
(including inside run_command
and add_postconf_script
, which doesn’t seem to be documented). Exposing just the meson invocation as an array to meson.build seems a lot cleaner however than needing to do shell-splitting inside commands.
Regards,
Andres
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Hi,
On Fri, Apr 2, 2021, at 08:43, behlec wrote:
The latter. That way no shell string parsing has to be done.
Regards,
Andres
@jpakkane ping? There’s a PR, implementing this - but it seems to be stuck waiting for design input?