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 21:06:51 +0200
commitecd8c7e4af52109a6f319bb99d50f1a615da784d (patch)
treec67316d0570d7b6b271db29ca24d0f4d00787159
parenta0c16f94fc3c327ac94c002bef16c0023e7f575c (diff)
downloadmeson-ecd8c7e4af52109a6f319bb99d50f1a615da784d.tar.gz
Update VS module version check.
-rw-r--r--mesonbuild/mesonlib/universal.py6
-rwxr-xr-xrun_project_tests.py2
-rwxr-xr-xrun_unittests.py2
3 files changed, 9 insertions, 1 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()
diff --git a/run_unittests.py b/run_unittests.py
index 81342615c..a381ae525 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -6230,7 +6230,7 @@ class WindowsTests(BasePlatformTests):
raise unittest.SkipTest(f'C++ modules only work with the Ninja backend (not {self.backend.name}).')
if 'VSCMD_VER' not in os.environ:
raise unittest.SkipTest('C++ modules is only supported with Visual Studio.')
- if version_compare(os.environ['VSCMD_VER'], '<16.9.0'):
+ if version_compare(os.environ['VSCMD_VER'], '<16.10.0'):
raise unittest.SkipTest('C++ modules are only supported with VS 2019 Preview or newer.')
self.init(os.path.join(self.unit_test_dir, '87 cpp modules'))
self.build()