Skip to content

Commit

Permalink
Change version_num from float to string.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorinj committed Dec 18, 2023
1 parent 495eec0 commit 729cd09
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions omaha/site_scons/site_tools/windows_vc.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ def SetMsvcCompilerVersion(
Raises:
ValueError: An error if vc_flavor is not valid.
"""
if version_num in (15.0, 16.0, 17.0):
if version_num in ('15.0', '16.0', '17.0'):
if not vc_flavor:
vc_flavor = 'x64_x86'
if vc_flavor not in ['x86_x86', 'x86_x64', 'x64_x86', 'x64_x64']:
raise ValueError('Invalid vc_flavor %s.' % str(vc_flavor))

if version_num == 17.0:
if version_num == '17.0':
env.Replace(VC17_0_DIR=os.environ.get('VCToolsInstallDir'))
_SetMsvcCompilerVersion(env,
vc_version='17.0',
vc_flavor=vc_flavor)
elif version_num == 16.0:
elif version_num == '16.0':
env.Replace(VC16_0_DIR=os.environ.get('VCToolsInstallDir'))
_SetMsvcCompilerVersion(env,
vc_version='16.0',
vc_flavor=vc_flavor)
elif version_num == 15.0:
elif version_num == '15.0':
env.Replace(VC15_0_DIR=os.environ.get('VCToolsInstallDir')),
_SetMsvcCompilerVersion(env,
vc_version='15.0',
Expand Down
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc15_0_host64_x64.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=15.0,
version_num='15.0',
vc_flavor='x64_x64')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc15_0_host64_x86.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=15.0,
version_num='15.0',
vc_flavor='x64_x86')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc15_0_host86_x64.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=15.0,
version_num='15.0',
vc_flavor='x86_x64')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc15_0_host86_x86.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=15.0,
version_num='15.0',
vc_flavor='x86_x86')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc16_0_host64_x64.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=16.0,
version_num='16.0',
vc_flavor='x64_x64')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc16_0_host64_x86.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=16.0,
version_num='16.0',
vc_flavor='x64_x86')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc16_0_host86_x64.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=16.0,
version_num='16.0',
vc_flavor='x86_x64')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc16_0_host86_x86.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=16.0,
version_num='16.0',
vc_flavor='x86_x86')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc17_0_host64_x64.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=17.0,
version_num='17.0',
vc_flavor='x64_x64')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc17_0_host64_x86.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=17.0,
version_num='17.0',
vc_flavor='x64_x86')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc17_0_host86_x64.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=17.0,
version_num='17.0',
vc_flavor='x86_x64')
2 changes: 1 addition & 1 deletion omaha/site_scons/site_tools/windows_vc17_0_host86_x86.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

def generate(env):
windows_vc.SetMsvcCompilerVersion(env=env,
version_num=17.0,
version_num='17.0',
vc_flavor='x86_x86')

0 comments on commit 729cd09

Please sign in to comment.