Skip to content

Release notes for 0.40.0

Jussi Pakkanen edited this page Apr 11, 2017 · 25 revisions

Preliminary, 0.40.0 has not been released yet

New features

Outputs of generators can be used in custom targets in the VS backend

This has been possible with the Ninja backend for a long time but now the Visual Studio backend works too.

compute_int method in the compiler objects

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.

Visual Studio 2017 support

There is now a VS2017 backend (--backend=vs2017) as well as a generic VS backend (--backend=vs) that autodetects the currently active VS version.

No download mode for wraps

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.

Overriding options per target

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 object get define

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

Cygwin support

Meson now works under Cygwin and we have added it to our CI test matrix.

Multiple install directories

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'])

Can specify method of obtaining dependencies

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')

More

Add here as they are merged to master.

Meson documentation has moved

All documentation is now on the main web site.

This page should be at this address.

Clone this wiki locally