default to version of visual studio from command prompt if it exists

This commit is contained in:
Anthony DuPont 2020-08-19 17:23:38 -04:00
parent 0eb79f2514
commit b3d1a0c2d4
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ all_icl_platforms = [ ('intel64', 'amd64'), ('em64t', 'amd64'), ('ia32', 'x86'),
"""List of icl platforms"""
def options(opt):
opt.add_option('--msvc_version', type='string', help = 'msvc version, eg: "msvc 10.0,msvc 9.0"', default='')
opt.add_option('--msvc_version', type='string', help = 'msvc version, eg: "msvc 10.0,msvc 9.0"', default="msvc " + re.match("(^\d+\.\d+).*", os.getenv("VSCMD_VER"))[1] if os.getenv("VSCMD_VER") else "")
opt.add_option('--msvc_targets', type='string', help = 'msvc targets, eg: "x64,arm"', default='')
opt.add_option('--no-msvc-lazy', action='store_false', help = 'lazily check msvc target environments', default=True, dest='msvc_lazy')