Fix boost link cmd line when compiler.find_library returns None, self.request_modules doesn't have 'boost_' prefix but lib_modules is keyed on 'boost_*'

pull/2482/merge
Goncalo Carvalho 7 years ago committed by Jussi Pakkanen
parent 12df9c46f5
commit 01611a66e2
  1. 7
      mesonbuild/dependencies/misc.py

@ -359,11 +359,12 @@ class BoostDependency(ExternalDependency):
args.append('-L' + self.libdir)
for lib in self.requested_modules:
# The compiler's library detector is the most reliable so use that first.
default_detect = self.compiler.find_library('boost_' + lib, self.env, [])
boost_lib = 'boost_' + lib
default_detect = self.compiler.find_library(boost_lib, self.env, [])
if default_detect is not None:
args += default_detect
elif lib in self.lib_modules:
linkcmd = '-l' + lib
elif boost_lib in self.lib_modules:
linkcmd = '-l' + boost_lib
args.append(linkcmd)
return args

Loading…
Cancel
Save