mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix clang/travis, prefer static libs when BOOST_ROOT is set.
This commit is contained in:
committed by
Vinnie Falco
parent
0f1e292e34
commit
096fcefae9
@@ -12,6 +12,11 @@ before_install:
|
||||
- sudo apt-get install -qq libboost1.55-all-dev
|
||||
# We want debug symbols for boost as we install gdb later
|
||||
- sudo apt-get install -qq libboost1.55-dbg
|
||||
- | # Setup the BOOST_ROOT
|
||||
export BOOST_ROOT=$HOME/boost_root
|
||||
mkdir -p $BOOST_ROOT/stage
|
||||
ln -s /usr/lib/x86_64-linux-gnu $BOOST_ROOT/stage/lib
|
||||
ln -s /usr/include/boost $BOOST_ROOT/boost
|
||||
- sudo apt-get install -qq mlocate
|
||||
- sudo updatedb
|
||||
- sudo locate libboost | grep /lib | grep -e ".a$"
|
||||
|
||||
18
SConstruct
18
SConstruct
@@ -199,6 +199,7 @@ def config_base(env):
|
||||
env.Append(LIBPATH=[
|
||||
os.path.join(BOOST_ROOT, 'stage', 'lib'),
|
||||
])
|
||||
env['BOOST_ROOT'] = BOOST_ROOT
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
@@ -262,15 +263,24 @@ def config_env(toolchain, variant, env):
|
||||
'-Wno-unused-but-set-variable'
|
||||
])
|
||||
|
||||
env.Append(LIBS=[
|
||||
boost_libs = [
|
||||
'boost_date_time',
|
||||
'boost_filesystem',
|
||||
'boost_program_options',
|
||||
'boost_regex',
|
||||
'boost_system',
|
||||
'boost_thread',
|
||||
'dl',
|
||||
])
|
||||
'boost_thread'
|
||||
]
|
||||
# We prefer static libraries for boost
|
||||
if env.get('BOOST_ROOT'):
|
||||
static_libs = ['%s/stage/lib/lib%s.a' % (env['BOOST_ROOT'], l) for
|
||||
l in boost_libs]
|
||||
if all(os.path.exists(f) for f in static_libs):
|
||||
boost_libs = [File(f) for f in static_libs]
|
||||
|
||||
env.Append(LIBS=boost_libs)
|
||||
env.Append(LIBS=['dl'])
|
||||
|
||||
if Beast.system.osx:
|
||||
env.Append(LIBS=[
|
||||
'crypto',
|
||||
|
||||
Reference in New Issue
Block a user