New features (in development)
Support for bztar
in meson dist
The bztar
format is now supported in meson dist
. This format is also known
as bzip2
.
Cargo dependencies names now include the API version
Cargo dependencies names are now in the format <package_name>-<version>-rs
:
-
package_name
is defined in[package] name = ...
section of theCargo.toml
. -
version
is the API version deduced from[package] version = ...
as follow:-
x.y.z
-> 'x' -
0.x.y
-> '0.x' -
0.0.x
-> '0' It allows to make different dependencies for uncompatible versions of the same crate.
-
-
-rs
suffix is added to distinguish from regular system dependencies, for examplegstreamer-1.0
is a system pkg-config dependency andgstreamer-0.22-rs
is a Cargo dependency.
That means the .wrap
file should have dependency_names = foo-1-rs
in their
[provide]
section when Cargo.toml
has package name foo
and version 1.2
.
This is a breaking change (Cargo subprojects are still experimental), previous
versions were using <package_name>-rs
format.
Meson now propagates its build type to CMake
When the CMake build type variable, CMAKE_BUILD_TYPE
, is not set via the
add_cmake_defines
method of the cmake options
object,
it is inferred from the Meson build type.
Build types of the two build systems do not match perfectly. The mapping from
Meson build type to CMake build type is as follows:
-
debug
->Debug
-
debugoptimized
->RelWithDebInfo
-
release
->Release
-
minsize
->MinSizeRel
No CMake build type is set for the plain
Meson build type. The inferred CMake
build type overrides any CMAKE_BUILD_TYPE
environment variable.
compiler.run() method is now available for all languages
It used to be only implemented for C-like and D languages, but it is now available for all languages.
dependencies created by compiler.find_library implement the name()
method
Previously, for a dep
that might be returned by either dependency()
or
compiler.find_library()
, the method might or might not exist with no way
of telling.
Meson configure handles changes to options in more cases
Meson configure now correctly handles updates to the options file without a full
reconfigure. This allows making a change to the meson.options
or
meson_options.txt
file without a reconfigure.
For example, this now works:
meson setup builddir
git pull
meson configure builddir -Doption-added-by-pull=value
New meson format command
This command is similar to muon fmt
and allows to format a meson.build
document.
A new dependency for ObjFW is now supported
For example, you can create a simple application written using ObjFW like this:
project('SimpleApp', 'objc')
objfw_dep = dependency('objfw', version: '>= 1.0')
executable('SimpleApp', 'SimpleApp.m',
dependencies: [objfw_dep])
Modules are also supported. A test case using ObjFWTest can be created like this:
project('Tests', 'objc')
objfwtest_dep = dependency('objfw', version: '>= 1.1', modules: ['ObjFWTest'])
executable('Tests', ['FooTest.m', 'BarTest.m'],
dependencies: [objfwtest_dep])
Required kwarg on more compiler
methods
The following compiler
methods now support the required
keyword argument:
compiler.compiles()
compiler.links()
compiler.runs()
cc.compiles(valid, name: 'valid', required : true)
cc.links(valid, name: 'valid', required : true)
cc.run(valid, name: 'valid', required : true)
assert(not cc.compiles(valid, name: 'valid', required : opt))
assert(not cc.links(valid, name: 'valid', required : opt))
res = cc.run(valid, name: 'valid', required : opt)
assert(res.compiled())
assert(res.returncode() == 0)
assert(res.stdout() == '')
assert(res.stderr() == '')
The Meson test program supports a new "--interactive" argument
meson test --interactive
invokes tests with stdout, stdin and stderr
connected directly to the calling terminal. This can be useful when running
integration tests that run in containers or virtual machines which can spawn a
debug shell if a test fails.
Support for Texas Instruments C6000 C/C++ compiler
Meson now supports the TI C6000 C/C++ compiler use for the C6000 cpu family.
The example cross file is available in cross/ti-c6000.txt
.
Wayland stable protocols can be versioned
The wayland module now accepts a version number for stable protocols.
wl_mod = import('unstable-wayland')
wl_mod.find_protocol(
'linux-dmabuf',
state: 'stable'
version: 1
)
The results of the search are