-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Release notes for 0.40.0
Preliminary, 0.40.0 has not been released yet
This has been possible with the Ninja backend for a long time but now the Visual Studio backend works too.
This method can be used to evaluate the value of an expression. As an example:
cc = meson.get_compiler('c')
two = cc.compute_int('1 + 1') # A very slow way of adding two numbers.
There is now a VS2017 backend (--backend=vs2017
) as well as a generic VS backend (--backend=vs
) that autodetects the currently active VS version.
Added a new option wrap-mode
that can be toggled to prevent Meson from downloading dependency projects. Attempting to do so will cause an error. This is useful for distro packagers and other cases where you must explicitly enforce that nothing is downloaded from the net during configuration or build.
Build targets got a new keyword argument override_options
that can be used to override system options. As an example if you have a target that you know can't be built with -Werror
enabled you can override the value of the option like this:
executable('foo', 'foo.c', override_options : ['werror=false'])
Note that this does not affect project options, only those options that come from Meson (language standards, unity builds etc).
Compiler objects got a new method get_define()
that returns the given preprocessor symbol as a string.
cc = meson.get_compiler('c')
one = cc.get_define('__linux__') # returns '1' on Linux hosts
Meson now works under Cygwin and we have added it to our CI test matrix.
Some build targets produce many output files. Previously it was only possible to install all of them in the same directory, but now you can install each output in its own directory like this:
custom_target('two_out',
output : ['diff.h', 'diff.sh'],
command : [creator, '@OUTDIR@'],
install : true,
install_dir : ['dir1', 'dir2'])
Some dependencies have many ways of being provided. As an example Qt can either be detected via pkg-config
or qmake
. Until now Meson has had a heuristic for selecting which method to choose but sometimes it does the wrong thing. This can now be overridden with the method
keyword like this:
qt5_dep = dependency('qt5', modules : 'core', method : 'qmake')
Add here as they are merged to master.
All documentation is now on the main web site.
This page should be at this address.