mirror of https://gitlab.com/ita1024/waf.git
fix issue #1477, thanks to Maxime Arthaud for the patch.
This commit is contained in:
parent
f550175c7f
commit
6f228d762a
|
@ -1,3 +1,10 @@
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
rem path are automatically detected on Linux
|
rem path are automatically detected on Linux
|
||||||
python waf --boost-includes=c:\boost_1_45_0 --boost-libs=c:\boost_1_45_0\stage\lib %1 %2 %3
|
set BOOST_PATH=e:\project\libs\boost_1_55_0
|
||||||
|
set BOOST_LIB=%BOOST_PATH%\lib32-msvc-12.0
|
||||||
|
|
||||||
|
set LIB=%BOOST_LIB%
|
||||||
|
set INCLUDE=%BOOST_PATH%
|
||||||
|
|
||||||
|
python waf --boost-linkage_autodetect --boost-python=27 %*
|
||||||
|
|
|
@ -6,7 +6,7 @@ def options(opt):
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
conf.load('compiler_cxx boost')
|
conf.load('compiler_cxx boost')
|
||||||
conf.check_boost('system filesystem', mt=True)
|
conf.check_boost('system filesystem python', mt=True)
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
bld.program(source='main.cpp', target='app', use='BOOST')
|
bld.program(source='main.cpp', target='app', use='BOOST')
|
||||||
|
|
|
@ -229,6 +229,7 @@ def boost_get_libs(self, *k, **kw):
|
||||||
according to the parameters
|
according to the parameters
|
||||||
'''
|
'''
|
||||||
path, files = self.__boost_get_libs_path(**kw)
|
path, files = self.__boost_get_libs_path(**kw)
|
||||||
|
files = sorted(files, key=lambda f: len(f.name), reverse=True)
|
||||||
toolset = self.boost_get_toolset(kw.get('toolset', ''))
|
toolset = self.boost_get_toolset(kw.get('toolset', ''))
|
||||||
toolset_pat = '(-%s[0-9]{0,3})' % toolset
|
toolset_pat = '(-%s[0-9]{0,3})' % toolset
|
||||||
version = '(-%s)' % self.env.BOOST_VERSION
|
version = '(-%s)' % self.env.BOOST_VERSION
|
||||||
|
@ -260,7 +261,10 @@ def boost_get_libs(self, *k, **kw):
|
||||||
tags_pat = t and ''.join(t) or ''
|
tags_pat = t and ''.join(t) or ''
|
||||||
for lib in lib_names:
|
for lib in lib_names:
|
||||||
if lib == 'python':
|
if lib == 'python':
|
||||||
tags = '%s?(-py%s)?' % (tags_pat, kw['python'])
|
# for instance, with python='27',
|
||||||
|
# accepts '-py27', '-py2', '27' and '2'
|
||||||
|
# but will reject '-py3', '-py26', '26' and '3'
|
||||||
|
tags = '({0})?((-py{2})|(-py{1}(?=[^0-9]))|({2})|({1}(?=[^0-9]))|(?=[^0-9])(?!-py))'.format(tags_pat, kw['python'][0], kw['python'])
|
||||||
else:
|
else:
|
||||||
tags = tags_pat
|
tags = tags_pat
|
||||||
# Trying libraries, from most strict match to least one
|
# Trying libraries, from most strict match to least one
|
||||||
|
|
Loading…
Reference in New Issue