Better detection of Visual Studio compiler

pull/8791/head
Jacob Nielsen 4 years ago committed by GitHub
parent 619e05c8cf
commit 3e5ec00a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      mesonbuild/mesonmain.py

@ -54,6 +54,14 @@ def setup_vsenv():
return
if 'Visual Studio' in os.environ['PATH']:
return
# VSINSTALL is set when running setvars from a Visual Studio installation
# Tested with Visual Studio 2012 and 2017
if 'VSINSTALLDIR' in os.environ:
return
# Check explicitly for cl when on Windows
if shutil.which('cl.exe'):
return
bat_locator_bin = r'c:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'
if not os.path.exists(bat_locator_bin):
return

Loading…
Cancel
Save