summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2016-03-31 15:09:29 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2016-03-31 15:09:29 -0400
commit0b76e808ebf7618f7a7e3f6150b428e4c448e329 (patch)
tree584c2e54e238e5b9279b06a07ae39dd43c42d533
parent92c3f80f384d2825efeabd0d26aa534c0deb6988 (diff)
downloadmongo-0b76e808ebf7618f7a7e3f6150b428e4c448e329.tar.gz
SERVER-17294 Boost 1.60 Build Integration
-rw-r--r--SConstruct23
-rw-r--r--src/third_party/SConscript3
-rw-r--r--src/third_party/boost-1.60.0/SConscript82
3 files changed, 90 insertions, 18 deletions
diff --git a/SConstruct b/SConstruct
index 4b305b7f191..58fc2cdc1cf 100644
--- a/SConstruct
+++ b/SConstruct
@@ -313,14 +313,6 @@ add_option('use-system-wiredtiger',
nargs=0,
)
-boost_choices = ['1.56']
-add_option('internal-boost',
- choices=boost_choices,
- default=boost_choices[0],
- help='Specify internal boost version to use',
- type='choice',
-)
-
add_option('system-boost-lib-search-suffixes',
help='Comma delimited sequence of boost library suffixes to search',
)
@@ -1526,14 +1518,6 @@ if get_option("system-boost-lib-search-suffixes") is not None:
else:
boostSuffixList = boostSuffixList.split(',')
-# boostSuffix is used when using internal boost to select which version
-# of boost is in play.
-boostSuffix = "";
-if not use_system_version_of_library("boost"):
- # Boost release numbers are x.y.z, where z is usually 0 which we do not include in
- # the internal-boost option
- boostSuffix = "-%s.0" % get_option( "internal-boost")
-
# discover modules, and load the (python) module for each module's build.py
mongo_modules = moduleconfig.discover_modules('src/mongo/db/modules', get_option('modules'))
env['MONGO_MODULES'] = [m.name for m in mongo_modules]
@@ -1778,6 +1762,12 @@ def doConfigure(myenv):
# than the return type.
AddToCXXFLAGSIfSupported(myenv, "-Wredundant-move")
+ # Disable warning about variables that may not be initialized
+ # Failures are triggered in the case of boost::optional in GCC 4.8.x
+ # TODO: re-evaluate when we move to GCC 5.3
+ # see: http://stackoverflow.com/questions/21755206/how-to-get-around-gcc-void-b-4-may-be-used-uninitialized-in-this-funct
+ AddToCXXFLAGSIfSupported(myenv, "-Wno-maybe-uninitialized")
+
# Check if we need to disable null-conversion warnings
if myenv.ToolchainIs('clang'):
def CheckNullConversion(context):
@@ -2614,7 +2604,6 @@ Export("get_option")
Export("has_option use_system_version_of_library")
Export("serverJs")
Export("usemozjs")
-Export("boostSuffix")
Export('module_sconscripts')
Export("debugBuild optBuild")
Export("wiredtiger")
diff --git a/src/third_party/SConscript b/src/third_party/SConscript
index 9d061868442..fda277416e1 100644
--- a/src/third_party/SConscript
+++ b/src/third_party/SConscript
@@ -1,9 +1,10 @@
# -*- mode: python -*-
-Import("env use_system_version_of_library usemozjs boostSuffix get_option")
+Import("env use_system_version_of_library usemozjs get_option")
Import("wiredtiger")
Import("icuEnabled")
+boostSuffix = "-1.60.0"
snappySuffix = '-1.1.3'
zlibSuffix = '-1.2.8'
pcreSuffix = "-8.38"
diff --git a/src/third_party/boost-1.60.0/SConscript b/src/third_party/boost-1.60.0/SConscript
new file mode 100644
index 00000000000..20af7ae8d3c
--- /dev/null
+++ b/src/third_party/boost-1.60.0/SConscript
@@ -0,0 +1,82 @@
+# -*- 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'],
+ windows=['libs/thread/src/win32/thread.cpp',
+ 'libs/thread/src/win32/tss_pe.cpp']
+ ).get(env['TARGET_OS_FAMILY'], 'UNKNOWN_OS_FAMILY_FOR_BOOST_THREADS__%s' % env['TARGET_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,
+ LIBDEPS=[
+ 'boost_system',
+ ])
+
+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',
+ ],
+ LIBDEPS=[
+ 'boost_system',
+ ])
+
+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',
+ ])
+
+env.Library('boost_chrono', [
+ 'libs/chrono/src/chrono.cpp',
+ 'libs/chrono/src/process_cpu_clocks.cpp',
+ 'libs/chrono/src/thread_clock.cpp',
+ ],
+ LIBDEPS=[
+ 'boost_system',
+ ])
+
+regexEnv = env.Clone()
+if regexEnv.ToolchainIs("clang"):
+ regexEnv.AppendUnique(CCFLAGS=["-Wno-deprecated-register"])
+regexEnv.Library('boost_regex', [
+ 'libs/regex/src/c_regex_traits.cpp',
+ 'libs/regex/src/cpp_regex_traits.cpp',
+ 'libs/regex/src/cregex.cpp',
+ 'libs/regex/src/fileiter.cpp',
+ 'libs/regex/src/icu.cpp',
+ 'libs/regex/src/instances.cpp',
+ 'libs/regex/src/posix_api.cpp',
+ 'libs/regex/src/regex.cpp',
+ 'libs/regex/src/regex_debug.cpp',
+ 'libs/regex/src/regex_raw_buffer.cpp',
+ 'libs/regex/src/regex_traits_defaults.cpp',
+ 'libs/regex/src/static_mutex.cpp',
+ 'libs/regex/src/usinstances.cpp',
+ 'libs/regex/src/w32_regex_traits.cpp',
+ 'libs/regex/src/wc_regex_traits.cpp',
+ 'libs/regex/src/wide_posix_api.cpp',
+ 'libs/regex/src/winstances.cpp',
+ ])