Don't crash if we are not msvc.

pull/3004/head
Benjamin Redelings 7 years ago
parent f7862bcd92
commit 47ced35b77
  1. 14
      mesonbuild/dependencies/misc.py

@ -307,13 +307,15 @@ class BoostDependency(ExternalDependency):
def compiler_tag(self): def compiler_tag(self):
tag = None tag = None
compiler = self.env.detect_cpp_compiler(self.want_cross)
if mesonlib.for_windows(self.want_cross, self.env): if mesonlib.for_windows(self.want_cross, self.env):
comp_ts_version = self.env.detect_cpp_compiler(self.want_cross).get_toolset_version() if compiler.get_id() == 'msvc':
compiler_ts = comp_ts_version.split('.') comp_ts_version = compiler.get_toolset_version()
# FIXME - what about other compilers? compiler_ts = comp_ts_version.split('.')
tag = 'vc{}{}'.format(compiler_ts[0], compiler_ts[1]) # FIXME - what about other compilers?
tag = '-vc{}{}'.format(compiler_ts[0], compiler_ts[1])
tag = '-' + tag else:
tag = ''
return tag return tag
def threading_tag(self): def threading_tag(self):

Loading…
Cancel
Save