mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
SERVER-6951 SERVER-9656 SERVER-9849 Handle third_party libraries consistently
This commit is contained in:
parent
ec4e8f3ea7
commit
2e7d108efe
24
SConstruct
24
SConstruct
@ -245,8 +245,11 @@ 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 )
|
||||
|
||||
add_option( "use-system-sm", "use system version of spidermonkey library", 0, True )
|
||||
|
||||
add_option( "use-system-v8", "use system version of v8 library", 0, True )
|
||||
|
||||
add_option( "use-system-stemmer", "use system version of stemmer", 0, True )
|
||||
|
||||
add_option( "use-system-all" , "use all system libraries", 0 , True )
|
||||
|
||||
add_option( "use-cpu-profiler",
|
||||
@ -805,6 +808,9 @@ env.Prepend(CPPPATH=['$BUILD_DIR/third_party/s2'])
|
||||
if not use_system_version_of_library("stemmer"):
|
||||
env.Prepend(CPPPATH=['$BUILD_DIR/third_party/libstemmer_c/include'])
|
||||
|
||||
if not use_system_version_of_library("snappy"):
|
||||
env.Prepend(CPPPATH=['$BUILD_DIR/third_party/snappy'])
|
||||
|
||||
env.Append( CPPPATH=['$EXTRACPPPATH'],
|
||||
LIBPATH=['$EXTRALIBPATH'] )
|
||||
|
||||
@ -1129,6 +1135,24 @@ def doConfigure(myenv):
|
||||
|
||||
conf = Configure(myenv)
|
||||
|
||||
if use_system_version_of_library("pcre"):
|
||||
if not conf.CheckLib("pcre"):
|
||||
print( "Can't find pcre library" )
|
||||
Exit(1)
|
||||
if not conf.CheckLib("pcrecpp"):
|
||||
print( "Can't find prcecpp library" )
|
||||
Exit(1)
|
||||
|
||||
if use_system_version_of_library("snappy"):
|
||||
if not conf.CheckLib("snappy"):
|
||||
print( "Can't find snappy library" )
|
||||
Exit(1)
|
||||
|
||||
if use_system_version_of_library("stemmer"):
|
||||
if not conf.CheckLib("stemmer"):
|
||||
print( "Can't find stemmer library" )
|
||||
Exit(1)
|
||||
|
||||
if use_system_version_of_library("boost"):
|
||||
if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
|
||||
print( "can't find boost headers" )
|
||||
|
@ -135,7 +135,7 @@ env.StaticLibrary('expressions',
|
||||
LIBDEPS=['bson',
|
||||
'path',
|
||||
'$BUILD_DIR/mongo/db/common',
|
||||
'$BUILD_DIR/third_party/pcrecpp'
|
||||
'$BUILD_DIR/third_party/shim_pcrecpp'
|
||||
] )
|
||||
|
||||
env.StaticLibrary('expressions_geo',
|
||||
@ -273,7 +273,7 @@ env.StaticLibrary('mongocommon', commonFiles,
|
||||
'stacktrace',
|
||||
'stringutils',
|
||||
'fail_point',
|
||||
'$BUILD_DIR/third_party/pcrecpp',
|
||||
'$BUILD_DIR/third_party/shim_pcrecpp',
|
||||
'$BUILD_DIR/third_party/murmurhash3/murmurhash3',
|
||||
'$BUILD_DIR/third_party/shim_boost'] +
|
||||
extraCommonLibdeps)
|
||||
@ -371,7 +371,8 @@ env.CppUnitTest('bson_template_evaluator_test', ['scripting/bson_template_evalua
|
||||
if usesm:
|
||||
env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_spidermonkey.cpp',
|
||||
'scripting/sm_db.cpp'],
|
||||
LIBDEPS=['$BUILD_DIR/third_party/js-1.7/js', 'bson_template_evaluator'])
|
||||
LIBDEPS=['$BUILD_DIR/third_party/shim_spidermonkey',
|
||||
'bson_template_evaluator'])
|
||||
elif usev8:
|
||||
env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_v8.cpp',
|
||||
'scripting/v8_db.cpp',
|
||||
@ -833,7 +834,7 @@ if shellEnv is not None:
|
||||
"mongo",
|
||||
coreShellFiles,
|
||||
LIBDEPS=[ "clientandshell", "mongocommon", "scripting",
|
||||
"$BUILD_DIR/third_party/pcrecpp"] + env['MODULE_LIBDEPS_MONGOSHELL'] )
|
||||
"$BUILD_DIR/third_party/shim_pcrecpp"] + env['MODULE_LIBDEPS_MONGOSHELL'] )
|
||||
|
||||
shellEnv.Install( '#/', mongo_shell )
|
||||
|
||||
|
@ -37,7 +37,7 @@ env.StaticLibrary('base', [
|
||||
], LIBDEPS=["$BUILD_DIR/mongo/base/base",
|
||||
"$BUILD_DIR/mongo/bson",
|
||||
"$BUILD_DIR/mongo/platform/platform",
|
||||
"$BUILD_DIR/third_party/libstemmer_c/stemmer"
|
||||
"$BUILD_DIR/third_party/shim_stemmer"
|
||||
])
|
||||
|
||||
env.StaticLibrary( 'server_common', [
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "mongo/util/compress.h"
|
||||
|
||||
#include "third_party/snappy/snappy.h"
|
||||
#include "snappy.h"
|
||||
|
||||
namespace mongo {
|
||||
|
||||
|
12
src/third_party/SConscript
vendored
12
src/third_party/SConscript
vendored
@ -9,11 +9,11 @@ env.SConscript( [
|
||||
env.Append(CPPPATH='$BUILD_DIR/third_party/s2')
|
||||
|
||||
if use_system_version_of_library("pcre"):
|
||||
env.StaticLibrary( "pcrecpp", ['shim_pcrecpp.cc'],
|
||||
env.StaticLibrary( "shim_pcrecpp", ['shim_pcrecpp.cc'],
|
||||
SYSLIBDEPS=[ 'pcre' , 'pcrecpp' ] )
|
||||
else:
|
||||
env.SConscript('pcre-${PCRE_VERSION}/SConscript')
|
||||
env.StaticLibrary( "pcrecpp", ['shim_pcrecpp.cc'],
|
||||
env.StaticLibrary( "shim_pcrecpp", ['shim_pcrecpp.cc'],
|
||||
LIBDEPS=[ 'pcre-${PCRE_VERSION}/pcrecpp' ] )
|
||||
|
||||
if use_system_version_of_library("boost"):
|
||||
@ -60,4 +60,10 @@ else:
|
||||
env.StaticLibrary('shim_allocator', 'shim_allocator.cpp',
|
||||
LIBDEPS=['gperftools-2.0/tcmalloc_minimal'])
|
||||
|
||||
env.SConscript('libstemmer_c/SConscript')
|
||||
if use_system_version_of_library("stemmer"):
|
||||
env.StaticLibrary("shim_stemmer", ['shim_stemmer.cpp'],
|
||||
SYSLIBDEPS= ['stemmer'])
|
||||
else:
|
||||
env.SConscript('libstemmer_c/SConscript')
|
||||
env.StaticLibrary("shim_stemmer", ['shim_stemmer.cpp'],
|
||||
LIBDEPS=['libstemmer_c/stemmer'])
|
||||
|
3
src/third_party/shim_stemmer.cpp
vendored
Normal file
3
src/third_party/shim_stemmer.cpp
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
// This file intentionally blank. shim_stemmer.cpp is part of the
|
||||
// third_party/libstemmer_c library, which is just a placeholder for forwarding
|
||||
// library dependencies.
|
Loading…
Reference in New Issue
Block a user