diff options
author | Andrew Morrow <acm@mongodb.com> | 2017-01-03 23:16:10 -0500 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2017-02-05 16:42:14 -0500 |
commit | f29598f2b8d3caa12f9a4bdca3e0ccffbbb6a5cb (patch) | |
tree | 59d6a8e7fcafdebf7feb65f4bea83d94e3085a87 /SConstruct | |
parent | 955fe032a1cb83f4abe9932d59a6c02c473dc047 (diff) | |
download | mongo-f29598f2b8d3caa12f9a4bdca3e0ccffbbb6a5cb.tar.gz |
SERVER-27378 Narrow scope of enterprise module environment modifications
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 4f1d8e5e4d5..d5ee5082525 100644 --- a/SConstruct +++ b/SConstruct @@ -882,6 +882,7 @@ envDict = dict(BUILD_ROOT=buildDir, DIST_ARCHIVE_SUFFIX='.tgz', DIST_BINARIES=[], MODULE_BANNERS=[], + MODULE_INJECTORS=dict(), ARCHIVE_ADDITION_DIR_MAP={}, ARCHIVE_ADDITIONS=[], PYTHON=utils.find_python(), @@ -2978,6 +2979,13 @@ def injectMongoIncludePaths(thisEnv): thisEnv.AppendUnique(CPPPATH=['$BUILD_DIR']) env.AddMethod(injectMongoIncludePaths, 'InjectMongoIncludePaths') +def injectModule(env, module, **kwargs): + injector = env['MODULE_INJECTORS'].get(module) + if injector: + return injector(env, **kwargs) + return env +env.AddMethod(injectModule, 'InjectModule') + compileCommands = env.CompilationDatabase('compile_commands.json') compileDb = env.Alias("compiledb", compileCommands) |