mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
SERVER-8994: New internal-boost option to choose internal boost version
This commit is contained in:
parent
7a95cbf89f
commit
dae863af3f
16
SConstruct
16
SConstruct
@ -281,6 +281,11 @@ add_option( "use-system-tcmalloc", "use system version of tcmalloc library", 0,
|
||||
|
||||
add_option( "use-system-pcre", "use system version of pcre library", 0, True )
|
||||
|
||||
# library choices
|
||||
boost_choices = ['1.49', '1.55']
|
||||
add_option( "internal-boost", "Specify internal boost version to use", 1, True,
|
||||
type='choice', default=boost_choices[0], choices=boost_choices)
|
||||
|
||||
add_option( "use-system-boost", "use system version of boost libraries", 0, True )
|
||||
|
||||
add_option( "use-system-snappy", "use system version of snappy library", 0, True )
|
||||
@ -859,9 +864,15 @@ if not windows:
|
||||
if not use_system_version_of_library("pcre"):
|
||||
env.Prepend(CPPPATH=[ '$BUILD_DIR/third_party/pcre-${PCRE_VERSION}' ])
|
||||
|
||||
boostSuffix = "";
|
||||
|
||||
if not use_system_version_of_library("boost"):
|
||||
env.Prepend(CPPPATH=['$BUILD_DIR/third_party/boost'],
|
||||
CPPDEFINES=['BOOST_ALL_NO_LIB'])
|
||||
if get_option( "internal-boost") == "1.49":
|
||||
env.Prepend(CPPPATH=['$BUILD_DIR/third_party/boost'])
|
||||
else:
|
||||
env.Prepend(CPPPATH=['$BUILD_DIR/third_party/boost-1.55.0'])
|
||||
boostSuffix = "-1.55.0"
|
||||
env.Prepend(CPPDEFINES=['BOOST_ALL_NO_LIB'])
|
||||
|
||||
env.Prepend(CPPPATH=['$BUILD_DIR/third_party/s2'])
|
||||
|
||||
@ -1938,6 +1949,7 @@ Export("has_option use_system_version_of_library")
|
||||
Export("mongoCodeVersion")
|
||||
Export("usev8")
|
||||
Export("v8version v8suffix")
|
||||
Export("boostSuffix")
|
||||
Export("darwin windows solaris linux freebsd nix openbsd")
|
||||
Export('module_sconscripts')
|
||||
Export("debugBuild optBuild")
|
||||
|
13
src/third_party/SConscript
vendored
13
src/third_party/SConscript
vendored
@ -1,6 +1,6 @@
|
||||
# -*- mode: python -*-
|
||||
|
||||
Import("env use_system_version_of_library windows darwin usev8 v8suffix solaris")
|
||||
Import("env use_system_version_of_library windows darwin usev8 v8suffix solaris boostSuffix")
|
||||
|
||||
env.SConscript( [
|
||||
"murmurhash3/SConscript",
|
||||
@ -33,12 +33,13 @@ if use_system_version_of_library("boost"):
|
||||
env['LIBDEPS_BOOST_SYSTEM_SYSLIBDEP']
|
||||
] )
|
||||
else:
|
||||
env.SConscript('boost/SConscript')
|
||||
boostDirectory = 'boost' + boostSuffix
|
||||
env.SConscript(boostDirectory + '/SConscript')
|
||||
env.Library( "shim_boost", ['shim_boost.cpp'],
|
||||
LIBDEPS=[ 'boost/boost_program_options',
|
||||
'boost/boost_filesystem',
|
||||
'boost/boost_thread',
|
||||
'boost/boost_system',
|
||||
LIBDEPS=[ boostDirectory + '/boost_program_options',
|
||||
boostDirectory + '/boost_filesystem',
|
||||
boostDirectory + '/boost_thread',
|
||||
boostDirectory + '/boost_system',
|
||||
] )
|
||||
|
||||
if use_system_version_of_library("snappy"):
|
||||
|
44
src/third_party/boost-1.55.0/SConscript
vendored
Normal file
44
src/third_party/boost-1.55.0/SConscript
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
# -*- mode: python; -*-
|
||||
|
||||
Import("env")
|
||||
|
||||
env.Library('boost_system', ['libs/system/src/error_code.cpp'])
|
||||
|
||||
boost_thread_source = dict(
|
||||
posix=['libs/thread/src/pthread/once.cpp',
|
||||
'libs/thread/src/pthread/thread.cpp'],
|
||||
win=['libs/thread/src/win32/thread.cpp',
|
||||
'libs/thread/src/win32/tss_pe.cpp']
|
||||
).get(env['OS_FAMILY'], 'UNKNOWN_OS_FAMILY_FOR_BOOST_THREADS__%s' % env['OS_FAMILY'])
|
||||
|
||||
threadlib_env = env.Clone()
|
||||
threadlib_env.Append(CPPDEFINES=['BOOST_THREAD_BUILD_LIB'])
|
||||
threadlib_env.Library('boost_thread', [
|
||||
'libs/thread/src/future.cpp',
|
||||
'libs/thread/src/tss_null.cpp'
|
||||
] + boost_thread_source)
|
||||
|
||||
env.Library('boost_filesystem', [
|
||||
'libs/filesystem/src/codecvt_error_category.cpp',
|
||||
'libs/filesystem/src/operations.cpp',
|
||||
'libs/filesystem/src/path.cpp',
|
||||
'libs/filesystem/src/path_traits.cpp',
|
||||
'libs/filesystem/src/portability.cpp',
|
||||
'libs/filesystem/src/unique_path.cpp',
|
||||
'libs/filesystem/src/utf8_codecvt_facet.cpp',
|
||||
'libs/filesystem/src/windows_file_codecvt.cpp',
|
||||
])
|
||||
|
||||
env.Library('boost_program_options', [
|
||||
'libs/program_options/src/cmdline.cpp',
|
||||
'libs/program_options/src/config_file.cpp',
|
||||
'libs/program_options/src/convert.cpp',
|
||||
'libs/program_options/src/options_description.cpp',
|
||||
'libs/program_options/src/parsers.cpp',
|
||||
'libs/program_options/src/positional_options.cpp',
|
||||
'libs/program_options/src/split.cpp',
|
||||
'libs/program_options/src/utf8_codecvt_facet.cpp',
|
||||
'libs/program_options/src/value_semantic.cpp',
|
||||
'libs/program_options/src/variables_map.cpp',
|
||||
'libs/program_options/src/winmain.cpp',
|
||||
])
|
Loading…
Reference in New Issue
Block a user