diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-06-12 20:40:02 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-06-13 10:32:48 -0400 |
commit | d8cb62bf2b9bee010a7a4b09138ea15213405a08 (patch) | |
tree | abba1835b681cc6d78728c36f95feb64289e55ee /mesonbuild/coredata.py | |
parent | dbb857dd712e756db740a7ddc4890fb2bf965a03 (diff) | |
download | meson-d8cb62bf2b9bee010a7a4b09138ea15213405a08.zip meson-d8cb62bf2b9bee010a7a4b09138ea15213405a08.tar.gz meson-d8cb62bf2b9bee010a7a4b09138ea15213405a08.tar.bz2 |
Allow targetting Meson 1.2.0 when version is 1.1.99
When a project targets a dev version of Meson (e.g. 1.1.99) for
experimenting, this allows to use:
project(..., meson_version: '>=1.2.0')
It avoids getting warnings when using FeatureNew for features introduced
in 1.2.0.
Diffstat (limited to 'mesonbuild/coredata.py')
-rw-r--r-- | mesonbuild/coredata.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index e1fa047..4bd1629 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -61,6 +61,16 @@ if T.TYPE_CHECKING: # But the corresponding Git tag needs to be '0.1.0rc1' version = '1.1.99' +# The next stable version when we are in dev. This is used to allow projects to +# require meson version >=1.2.0 when using 1.1.99. FeatureNew won't warn when +# using a feature introduced in 1.2.0 when using Meson 1.1.99. +stable_version = version +if stable_version.endswith('.99'): + stable_version_array = stable_version.split('.') + stable_version_array[-1] = '0' + stable_version_array[-2] = str(int(version[-2]) + 1) + stable_version = '.'.join(stable_version_array) + backendlist = ['ninja', 'vs', 'vs2010', 'vs2012', 'vs2013', 'vs2015', 'vs2017', 'vs2019', 'vs2022', 'xcode', 'none'] DEFAULT_YIELDING = False |