From a1d9adba096589122aefc50fb9429ec0ce0432b9 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 2 Jul 2018 18:44:36 +0530 Subject: FeatureNew: Make all checks subproject-specific We now pass the current subproject to every FeatureNew and FeatureDeprecated call. This requires a bunch of rework to: 1. Ensure that we have access to the subproject in the list of arguments when used as a decorator (see _get_callee_args). 2. Pass the subproject to .use() when it's called manually. 3. We also can't do feature checks for new features in meson_options.txt because that's parsed before we know the meson_version from project() --- mesonbuild/mesonlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/mesonlib.py') diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index c122589..5f9b98a 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -23,8 +23,8 @@ from mesonbuild import mlog have_fcntl = False have_msvcrt = False -# Used to report conflicts between meson_version and new features used -target_version = '' +# {subproject: project_meson_version} +project_meson_versions = {} try: import fcntl -- cgit v1.1