summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2017-01-03 23:16:10 -0500
committerAndrew Morrow <acm@mongodb.com>2017-02-05 16:42:14 -0500
commitf29598f2b8d3caa12f9a4bdca3e0ccffbbb6a5cb (patch)
tree59d6a8e7fcafdebf7feb65f4bea83d94e3085a87 /SConstruct
parent955fe032a1cb83f4abe9932d59a6c02c473dc047 (diff)
downloadmongo-f29598f2b8d3caa12f9a4bdca3e0ccffbbb6a5cb.tar.gz
SERVER-27378 Narrow scope of enterprise module environment modifications
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct8
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)