diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-03-19 21:52:05 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-03-19 21:52:05 -0400 |
commit | 6c4e81f6c02fc3cca594659ff722e459de28b6fb (patch) | |
tree | 0704b2eba28b8e6b2ecfc378381a0cb2cac400e9 /SConstruct | |
parent | 79bbc738b71da6a22c0747eb0d92e9365f06d9ae (diff) | |
download | mongo-6c4e81f6c02fc3cca594659ff722e459de28b6fb.tar.gz |
Add LZ4 support to SCons
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 1c109c973c0..dc91570009e 100644 --- a/SConstruct +++ b/SConstruct @@ -25,6 +25,9 @@ AddOption("--enable-attach", dest="attach", action="store_true", default=False, AddOption("--enable-diagnostic", dest="diagnostic", action="store_true", default=False, help="Configure WiredTiger to perform various run-time diagnostic tests. DO NOT configure this option in production environments.") +AddOption("--enable-lz4", dest="lz4", type="string", nargs=1, action="store", + help="Use LZ4 compression") + AddOption("--enable-python", dest="lang-python", type="string", nargs=1, action="store", help="Build Python extension, specify location of swig.exe binary") @@ -89,6 +92,7 @@ env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 useZlib = GetOption("zlib") useSnappy = GetOption("snappy") +useLz4 = GetOption("lz4") useBdb = GetOption("bdb") wtlibs = [] @@ -117,6 +121,16 @@ if useSnappy: print 'snappy-c.h must be installed!' Exit(1) +if useLz4: + conf.env.Append(CPPPATH=[useLz4 + "/include"]) + conf.env.Append(LIBPATH=[useLz4 + "/lib"]) + if conf.CheckCHeader('lz4.h'): + conf.env.Append(CPPDEFINES=['HAVE_BUILTIN_EXTENSION_LZ4']) + wtlibs.append("lz4") + else: + print 'lz4.h must be installed!' + Exit(1) + if useBdb: conf.env.Append(CPPPATH=[useBdb+ "/include"]) conf.env.Append(LIBPATH=[useBdb+ "/lib"]) @@ -204,6 +218,9 @@ if useZlib: if useSnappy: wtsources.append("ext/compressors/snappy/snappy_compress.c") +if useLz4: + wtsources.append("ext/compressors/lz4/lz4_compress.c") + wt_objs = [env.Object(a) for a in wtsources] # Static Library - libwiredtiger.lib |