summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-03-15 19:36:46 +0000
committerJussi Pakkanen <jpakkane@gmail.com>2021-03-16 14:58:56 +0000
commita60ed284931e7b0af5596d63e8e127f779dbce2c (patch)
tree5e54414f70f8d42d2c5703d515e80f62e923bd8e
parent3ac3e125e4f3f74d95bdb20094ff4378dc10c872 (diff)
downloadmeson-vsmodver.tar.gz
Update VS module version check.vsmodver
-rw-r--r--mesonbuild/mesonlib/universal.py6
-rwxr-xr-xrun_project_tests.py2
2 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py
index b0c50c89e..b0b987e3f 100644
--- a/mesonbuild/mesonlib/universal.py
+++ b/mesonbuild/mesonlib/universal.py
@@ -685,6 +685,12 @@ def detect_vcs(source_dir: T.Union[str, Path]) -> T.Optional[T.Dict[str, str]]:
def current_vs_supports_modules() -> bool:
vsver = os.environ.get('VSCMD_VER', '')
+ nums = vsver.split('.', 2)
+ major = int(nums[0])
+ if major >= 17:
+ return True
+ if major == 16 and int(nums[1]) >= 10:
+ return True
return vsver.startswith('16.9.0') and '-pre.' in vsver
# a helper class which implements the same version ordering as RPM
diff --git a/run_project_tests.py b/run_project_tests.py
index 149caa26a..ab97ca93b 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -1338,6 +1338,8 @@ if __name__ == '__main__':
print('Meson build system', meson_version, 'Project Tests')
print('Using python', sys.version.split('\n')[0])
+ if 'VSCMD_VER' in os.environ:
+ print('VSCMD version', os.environ['VSCMD_VER'])
setup_commands(options.backend)
detect_system_compiler(options)
print_tool_versions()