diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2019-04-01 13:07:09 -0400 |
---|---|---|
committer | Billy Donahue <billy.donahue@mongodb.com> | 2019-04-08 10:22:17 -0400 |
commit | 2def9c02b31425551cf904d4b6e9920b64dd1c06 (patch) | |
tree | e1ad4ee413fe37e73e95375602f82c98cea9f8ce /src/third_party/SConscript | |
parent | c8a133c3714d80d02cb8524d5278e6c1321e26f1 (diff) | |
download | mongo-2def9c02b31425551cf904d4b6e9920b64dd1c06.tar.gz |
SERVER-40389 small tweaks to third_party/fmt & related.
Add an option to scons: --use-system-fmt
import.sh: use the upstream libfmt github repo.
StringData fmt interop
noexcept for to_string_view(StringData) hook
noexcept for StringData's rawData() and size()
add fmt to THIRD-PARTY-NOTICES + markdown tweaks
import the fmt LICENSE.rst
update fmt lib revision
Diffstat (limited to 'src/third_party/SConscript')
-rw-r--r-- | src/third_party/SConscript | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/src/third_party/SConscript b/src/third_party/SConscript index 9683b7e7480..67477e1fb57 100644 --- a/src/third_party/SConscript +++ b/src/third_party/SConscript @@ -163,18 +163,37 @@ env.AddMethod(injectThirdParty, 'InjectThirdParty') env = env.Clone() murmurEnv = env.Clone() +murmurEnv.InjectThirdParty(libraries=['fmt']) murmurEnv.SConscript('murmurhash3/SConscript', exports={ 'env' : murmurEnv }) s2Env = env.Clone() -s2Env.InjectThirdParty(libraries=['s2', 'boost', 'abseil-cpp']) +s2Env.InjectThirdParty(libraries=['s2', 'boost', 'abseil-cpp', 'fmt']) s2Env.InjectMongoIncludePaths() s2Env.SConscript('s2/SConscript', exports={'env' : s2Env}) -fmtEnv = env.Clone() -fmtEnv.InjectThirdParty(libraries=['fmt']) -fmtEnv.InjectMongoIncludePaths() -fmtEnv.SConscript('fmt/SConscript', exports={'env' : fmtEnv}) + +if use_system_version_of_library("fmt"): + fmtEnv = env.Clone( + SYSLIBDEPS=[ + env['LIBDEPS_FMT_SYSLIBDEP'], + ]) +else: + fmtEnv = env.Clone() + fmtEnv.InjectThirdParty(libraries=['fmt']) + fmtEnv.InjectMongoIncludePaths() + fmtEnv.SConscript('fmt/SConscript', exports={'env' : fmtEnv}) + fmtEnv = fmtEnv.Clone( + LIBDEPS_INTERFACE=[ + 'fmt/fmt', + ]) + +fmtEnv.Library( + target="shim_fmt", + source=[ + 'shim_fmt.cpp', + ]) + if use_system_version_of_library("pcre"): pcreEnv = env.Clone( |