mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
SERVER-18569 Standalone ASIO build system integration
This commit is contained in:
parent
3dc20841d6
commit
6b9931d988
@ -291,6 +291,8 @@ add_option( "use-system-stemmer", "use system version of stemmer", 0, True )
|
||||
|
||||
add_option( "use-system-yaml", "use system version of yaml", 0, True )
|
||||
|
||||
add_option( "use-system-asio", "use system version of ASIO", 0, True )
|
||||
|
||||
add_option( "use-system-all" , "use all system libraries", 0 , True )
|
||||
|
||||
# deprecated
|
||||
|
23
src/third_party/SConscript
vendored
23
src/third_party/SConscript
vendored
@ -51,6 +51,10 @@ if not use_system_version_of_library('yaml'):
|
||||
thirdPartyIncludePathList.append(
|
||||
('yaml', '#/src/third_party/yaml-cpp-0.5.1/include'))
|
||||
|
||||
if not use_system_version_of_library('asio'):
|
||||
thirdPartyIncludePathList.append(
|
||||
('asio', '#/src/third_party/asio-asio-1-11-0/asio/include'))
|
||||
|
||||
def injectAllThirdPartyIncludePaths(thisEnv):
|
||||
thisEnv.AppendUnique(CPPPATH=[entry[1] for entry in thirdPartyIncludePathList])
|
||||
|
||||
@ -295,3 +299,22 @@ if wiredtiger:
|
||||
'shim_wiredtiger.cpp'
|
||||
])
|
||||
|
||||
if use_system_version_of_library("asio"):
|
||||
asioEnv = env.Clone(
|
||||
SYSLIBDEPS=[
|
||||
env['LIBDEPS_ASIO_SYSLIBDEP'],
|
||||
])
|
||||
else:
|
||||
asioEnv = env.Clone()
|
||||
asioEnv.InjectThirdPartyIncludePaths(libraries=['asio'])
|
||||
asioEnv.SConscript('asio-asio-1-11-0/SConscript', exports={ 'env' : asioEnv })
|
||||
asioEnv = asioEnv.Clone(
|
||||
LIBDEPS=[
|
||||
'asio-asio-1-11-0/asio',
|
||||
])
|
||||
|
||||
asioEnv.Library(
|
||||
target="shim_asio",
|
||||
source=[
|
||||
'shim_asio.cpp'
|
||||
])
|
||||
|
8
src/third_party/asio-asio-1-11-0/SConscript
vendored
Normal file
8
src/third_party/asio-asio-1-11-0/SConscript
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
Import("env")
|
||||
|
||||
env.Library(
|
||||
target="asio",
|
||||
source=[
|
||||
"asio/src/asio.cpp",
|
||||
]
|
||||
)
|
@ -11,6 +11,11 @@
|
||||
#ifndef ASIO_DETAIL_CONFIG_HPP
|
||||
#define ASIO_DETAIL_CONFIG_HPP
|
||||
|
||||
// MongoDB modification. We want this standalone, and we want separate
|
||||
// compilation for what we can to cut down on compile times.
|
||||
# define ASIO_STANDALONE // MongoDB
|
||||
# define ASIO_SEPARATE_COMPILATION // MongoDB
|
||||
|
||||
#if defined(ASIO_STANDALONE)
|
||||
# define ASIO_DISABLE_BOOST_ARRAY 1
|
||||
# define ASIO_DISABLE_BOOST_ASSERT 1
|
||||
|
3
src/third_party/shim_asio.cpp
vendored
Normal file
3
src/third_party/shim_asio.cpp
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
// This file intentionally blank. shim_asio.cpp is part of the
|
||||
// third_party/asio library, which is just a placeholder for forwarding
|
||||
// library dependencies.
|
Loading…
Reference in New Issue
Block a user