summaryrefslogtreecommitdiff
path: root/src/SConscript
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2016-12-21 18:48:56 -0500
committerAndrew Morrow <acm@mongodb.com>2017-01-03 09:45:52 -0500
commit1346352ff66b163fb010a270d1826c18699f3b36 (patch)
tree1fbe90cabe0bbdc3c6601008effbcac09ca05c65 /src/SConscript
parent4a5adbb971bdf95adce07ec01120c24b44268946 (diff)
downloadmongo-1346352ff66b163fb010a270d1826c18699f3b36.tar.gz
SERVER-27497 Scope SCons Environment changes narrowly
Diffstat (limited to 'src/SConscript')
-rw-r--r--src/SConscript32
1 files changed, 22 insertions, 10 deletions
diff --git a/src/SConscript b/src/SConscript
index 2dc6110008d..f12d13a6e41 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -3,13 +3,25 @@
# This is the principle SConscript file, invoked by the SConstruct. Its job is
# to delegate to any and all per-module SConscript files.
-Import('env module_sconscripts')
-
-env.SConscript(
- [
- # NOTE: We must do third_party first as it adds methods to the environment
- # that we need in the mongo sconscript
- 'third_party/SConscript',
- 'mongo/SConscript',
- ] + module_sconscripts
-)
+Import('env')
+Import('module_sconscripts')
+
+# NOTE: We must do third_party first as it adds methods to the environment
+# that we need in the mongo sconscript
+env = env.Clone()
+env.SConscript('third_party/SConscript', exports=['env'])
+
+# Inject boost and pcre from third_party globally for all core mongo code
+# and modules. Ideally, pcre wouldn't be here, but enough things require it
+# now that it seems hopeless to remove it now.
+env = env.Clone()
+env.InjectThirdPartyIncludePaths(libraries=[
+ 'boost',
+ 'pcre',
+])
+
+# Run the core mongodb SConscript.
+env.SConscript('mongo/SConscript', exports=['env'])
+
+# Run SConscripts for any modules in play
+env.SConscript(module_sconscripts, exports=['env'])