run_unittests: Don't assume that VS like compilers have MSVC versions

pull/5331/head
Dylan Baker 6 years ago
parent c72fd1e333
commit 73eca8255b
  1. 2
      run_unittests.py

@ -981,7 +981,7 @@ class InternalTests(unittest.TestCase):
toolset_ver = cc.get_toolset_version()
self.assertIsNotNone(toolset_ver)
# Visual Studio 2015 and older versions do not define VCToolsVersion
if int(''.join(cc.version.split('.')[0:2])) < 1910:
if cc.id == 'msvc' and int(''.join(cc.version.split('.')[0:2])) < 1910:
return
self.assertIn('VCToolsVersion', os.environ)
vctools_ver = os.environ['VCToolsVersion']

Loading…
Cancel
Save