SCons updates to support variant directories.
This patch is a reorganization of our build files, which brings them slightly
closer in line with standard SCons organization.
In particular, the SConstruct file sets up the various "build environment"
objects, by examining the local system and command line parameters. Then, it
delegates to some SConscript files, which describe build rules, like how to
compile "mongod" from source.
Typically, you would create several SConscript files for a project this large,
after breaking the project into logical sub projects, such as "platform
abstraction", "data manager", "query optimizer", etc. That will be future work.
For now, we only separate out the special rules for executing smoke tests into
SConscript.smoke. Pretty much all other build rules are in src/mongo/SConscript.
"tools" are placed in site_scons/site_tools.
This patch also includes better support for building and tracking dependencies
among static libraries ("libdeps" and "MergeLibrary"), and some incumbent, minor
restructuring.
This patch introduces a "warning" message from SCons about framework.o having
two rules that generate it. It is harmless, for now, and will be removed in
future work.
Future work also includes eliminating use of the SCons "Glob" utility, and
restructuring the source code into sensible components.
2012-01-04 11:30:29 -08:00
|
|
|
# -*- mode: python -*-
|
|
|
|
|
|
2017-04-02 18:10:24 -04:00
|
|
|
import libdeps
|
|
|
|
|
|
2016-03-31 15:09:29 -04:00
|
|
|
Import("env use_system_version_of_library usemozjs get_option")
|
2014-11-04 15:47:12 -05:00
|
|
|
Import("wiredtiger")
|
2018-02-16 14:55:02 -05:00
|
|
|
Import("mobile_se")
|
SCons updates to support variant directories.
This patch is a reorganization of our build files, which brings them slightly
closer in line with standard SCons organization.
In particular, the SConstruct file sets up the various "build environment"
objects, by examining the local system and command line parameters. Then, it
delegates to some SConscript files, which describe build rules, like how to
compile "mongod" from source.
Typically, you would create several SConscript files for a project this large,
after breaking the project into logical sub projects, such as "platform
abstraction", "data manager", "query optimizer", etc. That will be future work.
For now, we only separate out the special rules for executing smoke tests into
SConscript.smoke. Pretty much all other build rules are in src/mongo/SConscript.
"tools" are placed in site_scons/site_tools.
This patch also includes better support for building and tracking dependencies
among static libraries ("libdeps" and "MergeLibrary"), and some incumbent, minor
restructuring.
This patch introduces a "warning" message from SCons about framework.o having
two rules that generate it. It is harmless, for now, and will be removed in
future work.
Future work also includes eliminating use of the SCons "Glob" utility, and
restructuring the source code into sensible components.
2012-01-04 11:30:29 -08:00
|
|
|
|
2016-03-31 15:09:29 -04:00
|
|
|
boostSuffix = "-1.60.0"
|
2016-01-25 14:57:00 -05:00
|
|
|
snappySuffix = '-1.1.3'
|
2018-04-11 15:38:54 -04:00
|
|
|
zlibSuffix = '-1.2.11'
|
2017-08-22 13:08:48 -04:00
|
|
|
pcreSuffix = "-8.41"
|
2016-04-21 10:41:26 -04:00
|
|
|
mozjsSuffix = '-45'
|
2016-01-25 14:41:10 -05:00
|
|
|
yamlSuffix = '-0.5.3'
|
2016-03-30 11:19:11 -04:00
|
|
|
icuSuffix = '-57.1'
|
2016-04-12 08:41:55 -04:00
|
|
|
gperftoolsSuffix = '-2.5'
|
2018-02-01 11:32:04 -05:00
|
|
|
timelibSuffix = '-2018.01alpha1'
|
2018-02-01 15:22:48 -05:00
|
|
|
tomcryptSuffix = '-1.18.1'
|
2018-01-27 11:37:24 -05:00
|
|
|
benchmarkSuffix = '-1.3.0'
|
2018-02-16 14:55:02 -05:00
|
|
|
sqliteSuffix = '-amalgamation-3190300'
|
2014-10-28 12:08:02 -04:00
|
|
|
|
2014-08-22 15:37:54 -04:00
|
|
|
thirdPartyIncludePathList = [
|
|
|
|
|
('s2', '#/src/third_party/s2'),
|
2017-06-06 11:48:10 -04:00
|
|
|
('timelib', '#/src/third_party/timelib' + timelibSuffix),
|
2014-08-22 15:37:54 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if not use_system_version_of_library('tcmalloc'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
2016-04-12 08:41:55 -04:00
|
|
|
('gperftools', '#/src/third_party/gperftools' + gperftoolsSuffix + '/src'))
|
2014-08-22 15:37:54 -04:00
|
|
|
|
|
|
|
|
if not use_system_version_of_library('pcre'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
2015-04-03 15:26:11 -04:00
|
|
|
('pcre', '#/src/third_party/pcre' + pcreSuffix))
|
2014-08-22 15:37:54 -04:00
|
|
|
|
|
|
|
|
if not use_system_version_of_library('boost'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('boost', '#/src/third_party/boost' + boostSuffix))
|
|
|
|
|
|
|
|
|
|
if not use_system_version_of_library('snappy'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
2014-10-28 12:08:02 -04:00
|
|
|
('snappy', '#/src/third_party/snappy' + snappySuffix))
|
2014-08-22 15:37:54 -04:00
|
|
|
|
2015-11-09 13:19:23 -05:00
|
|
|
# Valgrind is a header only include as valgrind.h includes everything we need
|
|
|
|
|
if not use_system_version_of_library('valgrind'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('valgrind', '#/src/third_party/valgrind-3.11.0/include'))
|
|
|
|
|
|
2014-11-03 17:15:00 -05:00
|
|
|
if not use_system_version_of_library('zlib'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('zlib', '#/src/third_party/zlib' + zlibSuffix))
|
|
|
|
|
|
2018-02-16 14:55:02 -05:00
|
|
|
if not use_system_version_of_library('sqlite'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('sqlite', '#/src/third_party/sqlite' + sqliteSuffix))
|
|
|
|
|
|
2018-01-27 11:37:24 -05:00
|
|
|
if not use_system_version_of_library('google-benchmark'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('benchmark', '#/src/third_party/benchmark' + benchmarkSuffix + '/benchmark/include'))
|
|
|
|
|
|
2015-07-09 14:05:20 -04:00
|
|
|
# TODO: figure out if we want to offer system versions of mozjs. Mozilla
|
|
|
|
|
# hasn't offered a source tarball since 24, but in theory they could.
|
|
|
|
|
#
|
|
|
|
|
#if not use_system_version_of_library('mozjs'):
|
|
|
|
|
if True:
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('mozjs', ['#/src/third_party/mozjs' + mozjsSuffix + '/include',
|
|
|
|
|
'#/src/third_party/mozjs' + mozjsSuffix + '/mongo_sources',
|
|
|
|
|
'#/src/third_party/mozjs' + mozjsSuffix + '/platform/' + env["TARGET_ARCH"] + "/" + env["TARGET_OS"] + "/include",
|
|
|
|
|
]))
|
|
|
|
|
|
2017-07-18 16:13:32 -04:00
|
|
|
if "tom" in env["MONGO_CRYPTO"]:
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('tomcrypt', ['#/src/third_party/tomcrypt' + tomcryptSuffix + '/src/headers',
|
|
|
|
|
]))
|
|
|
|
|
|
|
|
|
|
|
2014-08-22 15:37:54 -04:00
|
|
|
if not use_system_version_of_library('stemmer'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('stemmer', '#/src/third_party/libstemmer_c/include'))
|
|
|
|
|
|
2015-06-16 17:33:46 -04:00
|
|
|
# Note that the wiredtiger.h header is generated, so
|
2014-11-04 15:47:12 -05:00
|
|
|
# we want to look for it in the build directory not
|
|
|
|
|
# the source directory.
|
|
|
|
|
if wiredtiger and not use_system_version_of_library('wiredtiger'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('wiredtiger', '$BUILD_DIR/third_party/wiredtiger'))
|
|
|
|
|
|
2014-08-22 15:37:54 -04:00
|
|
|
if not use_system_version_of_library('yaml'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
2016-01-25 14:41:10 -05:00
|
|
|
('yaml', '#/src/third_party/yaml-cpp' + yamlSuffix + '/include'))
|
2014-04-23 12:08:55 -04:00
|
|
|
|
2015-05-20 16:08:15 -04:00
|
|
|
if not use_system_version_of_library('asio'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
2017-04-27 15:06:37 -04:00
|
|
|
('asio', '#/src/third_party/asio-master/asio/include'))
|
2015-05-20 16:08:15 -04:00
|
|
|
|
2015-07-27 13:53:21 -04:00
|
|
|
if not use_system_version_of_library('intel_decimal128'):
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('intel_decimal128', '#/src/third_party/IntelRDFPMathLib20U1/LIBRARY'))
|
|
|
|
|
|
2016-05-17 12:11:27 -04:00
|
|
|
if not use_system_version_of_library('icu'):
|
2016-02-09 17:41:07 -05:00
|
|
|
thirdPartyIncludePathList.append(
|
2016-02-11 16:28:31 -05:00
|
|
|
('icu', '#/src/third_party/icu4c' + icuSuffix + '/source/common'))
|
|
|
|
|
thirdPartyIncludePathList.append(
|
|
|
|
|
('icu', '#/src/third_party/icu4c' + icuSuffix + '/source/i18n'))
|
2016-02-09 17:41:07 -05:00
|
|
|
|
2014-04-23 12:08:55 -04:00
|
|
|
def injectAllThirdPartyIncludePaths(thisEnv):
|
2015-09-01 10:36:08 -04:00
|
|
|
thisEnv.PrependUnique(CPPPATH=[entry[1] for entry in thirdPartyIncludePathList])
|
2014-04-23 12:08:55 -04:00
|
|
|
|
|
|
|
|
def injectThirdPartyIncludePaths(thisEnv, libraries):
|
2015-09-01 10:36:08 -04:00
|
|
|
thisEnv.PrependUnique(CPPPATH=[
|
2014-08-22 15:37:54 -04:00
|
|
|
entry[1] for entry in thirdPartyIncludePathList if entry[0] in libraries])
|
2014-04-23 12:08:55 -04:00
|
|
|
|
|
|
|
|
env.AddMethod(injectAllThirdPartyIncludePaths, 'InjectAllThirdPartyIncludePaths')
|
|
|
|
|
env.AddMethod(injectThirdPartyIncludePaths, 'InjectThirdPartyIncludePaths')
|
|
|
|
|
|
2016-12-21 18:48:56 -05:00
|
|
|
env = env.Clone()
|
2014-04-23 12:08:55 -04:00
|
|
|
|
|
|
|
|
murmurEnv = env.Clone()
|
|
|
|
|
murmurEnv.SConscript('murmurhash3/SConscript', exports={ 'env' : murmurEnv })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
s2Env = env.Clone()
|
|
|
|
|
s2Env.InjectThirdPartyIncludePaths(libraries=['s2', 'boost'])
|
|
|
|
|
s2Env.InjectMongoIncludePaths()
|
|
|
|
|
s2Env.SConscript('s2/SConscript', exports={'env' : s2Env})
|
|
|
|
|
|
SCons updates to support variant directories.
This patch is a reorganization of our build files, which brings them slightly
closer in line with standard SCons organization.
In particular, the SConstruct file sets up the various "build environment"
objects, by examining the local system and command line parameters. Then, it
delegates to some SConscript files, which describe build rules, like how to
compile "mongod" from source.
Typically, you would create several SConscript files for a project this large,
after breaking the project into logical sub projects, such as "platform
abstraction", "data manager", "query optimizer", etc. That will be future work.
For now, we only separate out the special rules for executing smoke tests into
SConscript.smoke. Pretty much all other build rules are in src/mongo/SConscript.
"tools" are placed in site_scons/site_tools.
This patch also includes better support for building and tracking dependencies
among static libraries ("libdeps" and "MergeLibrary"), and some incumbent, minor
restructuring.
This patch introduces a "warning" message from SCons about framework.o having
two rules that generate it. It is harmless, for now, and will be removed in
future work.
Future work also includes eliminating use of the SCons "Glob" utility, and
restructuring the source code into sensible components.
2012-01-04 11:30:29 -08:00
|
|
|
|
2012-03-24 10:26:41 -04:00
|
|
|
if use_system_version_of_library("pcre"):
|
2014-04-23 12:08:55 -04:00
|
|
|
pcreEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_PCRE_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_PCRECPP_SYSLIBDEP'],
|
|
|
|
|
])
|
SCons updates to support variant directories.
This patch is a reorganization of our build files, which brings them slightly
closer in line with standard SCons organization.
In particular, the SConstruct file sets up the various "build environment"
objects, by examining the local system and command line parameters. Then, it
delegates to some SConscript files, which describe build rules, like how to
compile "mongod" from source.
Typically, you would create several SConscript files for a project this large,
after breaking the project into logical sub projects, such as "platform
abstraction", "data manager", "query optimizer", etc. That will be future work.
For now, we only separate out the special rules for executing smoke tests into
SConscript.smoke. Pretty much all other build rules are in src/mongo/SConscript.
"tools" are placed in site_scons/site_tools.
This patch also includes better support for building and tracking dependencies
among static libraries ("libdeps" and "MergeLibrary"), and some incumbent, minor
restructuring.
This patch introduces a "warning" message from SCons about framework.o having
two rules that generate it. It is harmless, for now, and will be removed in
future work.
Future work also includes eliminating use of the SCons "Glob" utility, and
restructuring the source code into sensible components.
2012-01-04 11:30:29 -08:00
|
|
|
else:
|
2014-04-23 12:08:55 -04:00
|
|
|
pcreEnv = env.Clone()
|
|
|
|
|
pcreEnv.InjectThirdPartyIncludePaths(libraries=['pcre'])
|
2015-04-03 15:26:11 -04:00
|
|
|
pcreEnv.SConscript('pcre' + pcreSuffix + '/SConscript', exports={ 'env' : pcreEnv })
|
2014-04-23 12:08:55 -04:00
|
|
|
pcreEnv = pcreEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'pcre' + pcreSuffix + '/pcrecpp',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
pcreEnv.Library(
|
|
|
|
|
target="shim_pcrecpp",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_pcrecpp.cc',
|
|
|
|
|
])
|
2012-03-02 11:13:09 -05:00
|
|
|
|
2014-04-23 12:08:55 -04:00
|
|
|
|
|
|
|
|
boostEnv = env
|
2012-03-24 10:26:41 -04:00
|
|
|
if use_system_version_of_library("boost"):
|
2014-04-23 12:08:55 -04:00
|
|
|
# On windows, we don't need the syslibdeps because autolib will select the right libraries
|
|
|
|
|
# for us automatically.
|
2015-03-30 12:14:42 -04:00
|
|
|
if not env.TargetOSIs('windows'):
|
2014-04-23 12:08:55 -04:00
|
|
|
boostEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_BOOST_PROGRAM_OPTIONS_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_BOOST_FILESYSTEM_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_BOOST_SYSTEM_SYSLIBDEP'],
|
2016-07-21 15:49:59 -04:00
|
|
|
env['LIBDEPS_BOOST_IOSTREAMS_SYSLIBDEP'],
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
2012-03-02 11:13:09 -05:00
|
|
|
else:
|
2014-06-06 08:03:24 -04:00
|
|
|
boostDirectory = 'boost' + boostSuffix
|
2014-04-23 12:08:55 -04:00
|
|
|
boostEnv = env.Clone()
|
|
|
|
|
boostEnv.InjectThirdPartyIncludePaths(libraries=['boost'])
|
|
|
|
|
boostEnv.SConscript(boostDirectory + '/SConscript', exports={ 'env' : boostEnv })
|
|
|
|
|
boostEnv = boostEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
boostDirectory + '/boost_program_options',
|
|
|
|
|
boostDirectory + '/boost_filesystem',
|
|
|
|
|
boostDirectory + '/boost_system',
|
|
|
|
|
boostDirectory + '/boost_iostreams',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
boostEnv.Library(
|
|
|
|
|
target="shim_boost",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_boost.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2013-09-10 11:56:57 -04:00
|
|
|
|
2012-03-24 10:42:10 -04:00
|
|
|
if use_system_version_of_library("snappy"):
|
2014-04-23 12:08:55 -04:00
|
|
|
snappyEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_SNAPPY_SYSLIBDEP'],
|
|
|
|
|
])
|
2012-03-24 10:42:10 -04:00
|
|
|
else:
|
2014-04-23 12:08:55 -04:00
|
|
|
snappyEnv = env.Clone()
|
|
|
|
|
snappyEnv.InjectThirdPartyIncludePaths(libraries=['snappy'])
|
2014-10-28 15:53:23 -04:00
|
|
|
snappyEnv.InjectMongoIncludePaths()
|
2014-10-28 12:08:02 -04:00
|
|
|
snappyEnv.SConscript('snappy' + snappySuffix + '/SConscript', exports={ 'env' : snappyEnv })
|
2014-04-23 12:08:55 -04:00
|
|
|
snappyEnv = snappyEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'snappy' + snappySuffix + '/snappy',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
snappyEnv.Library(
|
|
|
|
|
target="shim_snappy",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_snappy.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2014-11-03 17:15:00 -05:00
|
|
|
if use_system_version_of_library("zlib"):
|
|
|
|
|
zlibEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_ZLIB_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
zlibEnv = env.Clone()
|
|
|
|
|
zlibEnv.InjectThirdPartyIncludePaths(libraries=['zlib'])
|
|
|
|
|
zlibEnv.SConscript('zlib' + zlibSuffix + '/SConscript', exports={ 'env' : zlibEnv })
|
|
|
|
|
zlibEnv = zlibEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'zlib' + zlibSuffix + '/zlib',
|
2014-11-03 17:15:00 -05:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
zlibEnv.Library(
|
|
|
|
|
target="shim_zlib",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_zlib.cpp',
|
|
|
|
|
])
|
2012-03-26 10:33:16 -04:00
|
|
|
|
2018-01-27 11:37:24 -05:00
|
|
|
if use_system_version_of_library("google-benchmark"):
|
|
|
|
|
benchmarkEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_BENCHMARK_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
benchmarkEnv = env.Clone()
|
|
|
|
|
benchmarkEnv.InjectThirdPartyIncludePaths(libraries=['benchmark'])
|
|
|
|
|
benchmarkEnv.SConscript(
|
|
|
|
|
'benchmark' + benchmarkSuffix + '/SConscript',
|
|
|
|
|
exports={ 'env' : benchmarkEnv })
|
|
|
|
|
benchmarkEnv = benchmarkEnv.Clone(
|
|
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'benchmark' + benchmarkSuffix + '/benchmark',
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
benchmarkEnv.Library(
|
|
|
|
|
target="shim_benchmark",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_benchmark.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2015-07-09 14:05:20 -04:00
|
|
|
if usemozjs:
|
|
|
|
|
mozjsEnv = env.Clone()
|
|
|
|
|
mozjsEnv.SConscript('mozjs' + mozjsSuffix + '/SConscript', exports={'env' : mozjsEnv })
|
|
|
|
|
mozjsEnv = mozjsEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'mozjs' + mozjsSuffix + '/mozjs',
|
|
|
|
|
'shim_zlib',
|
2015-07-09 14:05:20 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
mozjsEnv.Library(
|
|
|
|
|
target="shim_mozjs",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_mozjs.cpp',
|
|
|
|
|
])
|
2014-04-23 12:08:55 -04:00
|
|
|
|
2017-07-18 16:13:32 -04:00
|
|
|
if "tom" in env["MONGO_CRYPTO"]:
|
|
|
|
|
tomcryptEnv = env.Clone()
|
|
|
|
|
tomcryptEnv.SConscript('tomcrypt' + tomcryptSuffix + '/SConscript', exports={'env' : tomcryptEnv })
|
|
|
|
|
tomcryptEnv = tomcryptEnv.Clone(
|
|
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'tomcrypt' + tomcryptSuffix + '/tomcrypt',
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
tomcryptEnv.Library(
|
|
|
|
|
target="shim_tomcrypt",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_tomcrypt.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2014-04-23 12:08:55 -04:00
|
|
|
gperftoolsEnv = env
|
2016-01-19 15:34:25 -05:00
|
|
|
if (gperftoolsEnv['MONGO_ALLOCATOR'] == "tcmalloc"):
|
2014-04-23 12:08:55 -04:00
|
|
|
if use_system_version_of_library("tcmalloc"):
|
|
|
|
|
gperftoolsEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_TCMALLOC_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
gperftoolsEnv = env.Clone()
|
|
|
|
|
gperftoolsEnv.InjectThirdPartyIncludePaths(libraries=['gperftools'])
|
2016-04-12 08:41:55 -04:00
|
|
|
gperftoolsEnv.SConscript('gperftools' + gperftoolsSuffix + '/SConscript', exports={ 'env' : gperftoolsEnv })
|
2014-04-23 12:08:55 -04:00
|
|
|
gperftoolsEnv = gperftoolsEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'gperftools' + gperftoolsSuffix + '/tcmalloc_minimal',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
gperftoolsEnv.Library(
|
|
|
|
|
target="shim_allocator",
|
|
|
|
|
source=[
|
|
|
|
|
"shim_allocator.cpp",
|
|
|
|
|
])
|
|
|
|
|
|
2012-12-25 12:07:05 -05:00
|
|
|
|
2013-06-03 14:33:18 -04:00
|
|
|
if use_system_version_of_library("stemmer"):
|
2014-04-23 12:08:55 -04:00
|
|
|
stemmerEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_STEMMER_SYSLIBDEP'],
|
|
|
|
|
])
|
2013-06-03 14:33:18 -04:00
|
|
|
else:
|
2014-04-23 12:08:55 -04:00
|
|
|
stemmerEnv = env.Clone()
|
|
|
|
|
stemmerEnv.InjectThirdPartyIncludePaths(libraries=['stemmer'])
|
|
|
|
|
stemmerEnv.SConscript('libstemmer_c/SConscript', exports={ 'env' : stemmerEnv })
|
|
|
|
|
stemmerEnv = stemmerEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'libstemmer_c/stemmer',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
stemmerEnv.Library(
|
|
|
|
|
target="shim_stemmer",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_stemmer.cpp'
|
|
|
|
|
])
|
|
|
|
|
|
2013-11-09 15:38:08 -05:00
|
|
|
|
|
|
|
|
if use_system_version_of_library("yaml"):
|
2014-04-23 12:08:55 -04:00
|
|
|
yamlEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_YAML_SYSLIBDEP'],
|
|
|
|
|
])
|
2013-11-09 15:38:08 -05:00
|
|
|
else:
|
2014-04-23 12:08:55 -04:00
|
|
|
yamlEnv = env.Clone()
|
|
|
|
|
yamlEnv.InjectThirdPartyIncludePaths(libraries=['yaml', 'boost'])
|
2016-01-25 14:41:10 -05:00
|
|
|
yamlEnv.SConscript('yaml-cpp' + yamlSuffix + '/SConscript', exports={ 'env' : yamlEnv })
|
2014-04-23 12:08:55 -04:00
|
|
|
yamlEnv = yamlEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'yaml-cpp' + yamlSuffix + '/yaml',
|
2014-04-23 12:08:55 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
yamlEnv.Library(
|
|
|
|
|
target="shim_yaml",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_yaml.cpp',
|
|
|
|
|
])
|
2014-04-14 16:41:39 -04:00
|
|
|
|
2017-06-06 11:48:10 -04:00
|
|
|
timelibEnv = env.Clone();
|
|
|
|
|
timelibEnv.InjectThirdPartyIncludePaths(libraries=['timelib'])
|
|
|
|
|
timelibEnv.SConscript('timelib' + timelibSuffix + '/SConscript', exports={ 'env' : timelibEnv })
|
|
|
|
|
timelibEnv = timelibEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'timelib' + timelibSuffix + '/timelib',
|
2017-06-06 11:48:10 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
timelibEnv.Library(
|
|
|
|
|
target='shim_timelib',
|
|
|
|
|
source=[
|
|
|
|
|
'shim_timelib.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2014-11-04 15:47:12 -05:00
|
|
|
if wiredtiger:
|
|
|
|
|
if use_system_version_of_library("wiredtiger"):
|
|
|
|
|
wiredtigerEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_WIREDTIGER_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
wiredtigerEnv = env.Clone()
|
|
|
|
|
wiredtigerEnv.InjectThirdPartyIncludePaths(libraries=['wiredtiger'])
|
|
|
|
|
wiredtigerEnv.SConscript('wiredtiger/SConscript', exports={ 'env' : wiredtigerEnv })
|
|
|
|
|
wiredtigerEnv = wiredtigerEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'wiredtiger/wiredtiger',
|
2014-11-04 15:47:12 -05:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
wiredtigerEnv.Library(
|
|
|
|
|
target="shim_wiredtiger",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_wiredtiger.cpp'
|
|
|
|
|
])
|
|
|
|
|
|
2018-02-16 14:55:02 -05:00
|
|
|
if use_system_version_of_library("sqlite"):
|
|
|
|
|
sqliteEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_SQLITE_SYSLIBDEP']
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
sqliteEnv = env.Clone()
|
|
|
|
|
sqliteEnv.InjectThirdPartyIncludePaths(libraries=['sqlite'])
|
|
|
|
|
sqliteEnv.SConscript('sqlite' + sqliteSuffix + '/SConscript', exports={ 'env' : sqliteEnv })
|
|
|
|
|
sqliteEnv = sqliteEnv.Clone(
|
|
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'sqlite' + sqliteSuffix + '/sqlite3',
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
sqliteEnv.Library(
|
|
|
|
|
target='shim_sqlite',
|
|
|
|
|
source=[
|
|
|
|
|
'shim_sqlite.cpp',
|
|
|
|
|
])
|
|
|
|
|
|
2015-05-20 16:08:15 -04:00
|
|
|
if use_system_version_of_library("asio"):
|
2016-07-23 17:08:14 -04:00
|
|
|
# Normally, we would request LIBDEPS_ASIO_SYSLIBDEP here, but on most systems, the system asio
|
|
|
|
|
# will be header only so there is no library required. In the rare case where one is, it can be
|
|
|
|
|
# injected via LIBS= on the command line.
|
|
|
|
|
asioEnv = env.Clone()
|
2015-05-20 16:08:15 -04:00
|
|
|
else:
|
|
|
|
|
asioEnv = env.Clone()
|
|
|
|
|
asioEnv.InjectThirdPartyIncludePaths(libraries=['asio'])
|
2017-04-27 15:06:37 -04:00
|
|
|
asioEnv.SConscript('asio-master/SConscript', exports={ 'env' : asioEnv })
|
2015-05-20 16:08:15 -04:00
|
|
|
asioEnv = asioEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'asio-master/asio',
|
2015-05-20 16:08:15 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
asioEnv.Library(
|
|
|
|
|
target="shim_asio",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_asio.cpp'
|
|
|
|
|
])
|
2015-07-27 13:53:21 -04:00
|
|
|
|
2016-04-22 14:42:28 -04:00
|
|
|
if use_system_version_of_library("intel_decimal128"):
|
|
|
|
|
intelDecimal128Env = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_INTEL_DECIMAL128_SYSLIBDEP'],
|
|
|
|
|
])
|
|
|
|
|
else:
|
|
|
|
|
intelDecimal128Env = env.Clone()
|
|
|
|
|
intelDecimal128Env.InjectThirdPartyIncludePaths(libraries=['intel_decimal128'])
|
|
|
|
|
intelDecimal128Env.SConscript('IntelRDFPMathLib20U1/SConscript', exports={ 'env' : intelDecimal128Env })
|
|
|
|
|
intelDecimal128Env = intelDecimal128Env.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'IntelRDFPMathLib20U1/intel_decimal128',
|
2016-04-22 14:42:28 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
intelDecimal128Env.Library(
|
|
|
|
|
target="shim_intel_decimal128",
|
|
|
|
|
source=[
|
|
|
|
|
'shim_intel_decimal128.cpp'
|
|
|
|
|
])
|
2016-02-09 17:41:07 -05:00
|
|
|
|
2016-05-17 12:11:27 -04:00
|
|
|
if use_system_version_of_library("icu"):
|
|
|
|
|
icuEnv = env.Clone(
|
|
|
|
|
SYSLIBDEPS=[
|
|
|
|
|
env['LIBDEPS_ICUDATA_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_ICUI18N_SYSLIBDEP'],
|
|
|
|
|
env['LIBDEPS_ICUUC_SYSLIBDEP'],
|
2016-02-09 17:41:07 -05:00
|
|
|
])
|
2016-05-17 12:11:27 -04:00
|
|
|
else:
|
|
|
|
|
icuEnv = env.Clone()
|
|
|
|
|
icuEnv.InjectThirdPartyIncludePaths(libraries=['icu'])
|
|
|
|
|
icuEnv.SConscript('icu4c' + icuSuffix + '/source/SConscript', exports={ 'env' : icuEnv })
|
|
|
|
|
icuEnv = icuEnv.Clone(
|
2017-07-07 11:45:50 -04:00
|
|
|
LIBDEPS_INTERFACE=[
|
|
|
|
|
'icu4c' + icuSuffix + '/source/icu_i18n',
|
2016-05-17 12:11:27 -04:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
icuEnv.Library(
|
|
|
|
|
target='shim_icu',
|
|
|
|
|
source=[
|
|
|
|
|
'shim_icu.cpp',
|
|
|
|
|
])
|