@@ -60,28 +60,34 @@ cxx_driver_variables:
6060# # Common sets of scons flags
6161 scons_flags :
6262 standard : &scons_flags_64
63- scons_flags : " --64 -j$(grep -c ^processor /proc/cpuinfo) - -ssl --use-sasl-client --sharedclient"
63+ scons_flags : " --64 --ssl --use-sasl-client --sharedclient"
6464 standard_32 : &scons_flags_32
65- scons_flags : " --32 -j$(grep -c ^processor /proc/cpuinfo) - -ssl --use-sasl-client --sharedclient"
65+ scons_flags : " --32 --ssl --use-sasl-client --sharedclient"
6666 ubuntu_c++11 : &scons_flags_cpp11
67- scons_flags : " --64 -j$(grep -c ^processor /proc/cpuinfo) - -c++11 --ssl --use-sasl-client --sharedclient"
67+ scons_flags : " --64 --c++11 --ssl --use-sasl-client --sharedclient"
6868 osx_108 : &scons_flags_osx_108
69- scons_flags : " --64 -j$(sysctl -n hw.logicalcpu) - -ssl --use-sasl-client --sharedclient --osx-version-min=10.6"
69+ scons_flags : " --64 --ssl --use-sasl-client --sharedclient --osx-version-min=10.6"
7070 # # test all plausible combinations of static/dynamic mongo client and windows runtime:
7171 static_windows : &scons_flags_64_windows_static
72- scons_flags : " --64 -j$(grep -c ^processor /proc/cpuinfo) - -ssl --use-sasl-client"
72+ scons_flags : " --64 --ssl --use-sasl-client"
7373 dynamic_RT_windows : &scons_flags_64_windows_dynamic_rt
74- scons_flags : " --64 -j$(grep -c ^processor /proc/cpuinfo) - -ssl --use-sasl-client --dynamic-windows"
74+ scons_flags : " --64 --ssl --use-sasl-client --dynamic-windows"
7575 dynamic_windows : &scons_flags_64_windows_dynamic
76- scons_flags : " --64 -j$(grep -c ^processor /proc/cpuinfo) - -ssl --use-sasl-client --dynamic-windows --sharedclient"
76+ scons_flags : " --64 --ssl --use-sasl-client --dynamic-windows --sharedclient"
7777 32bit_windows : &scons_flags_32_windows_dynamic
78- scons_flags : " --32 -j$(grep -c ^processor /proc/cpuinfo) - -dynamic-windows --sharedclient"
78+ scons_flags : " --32 --dynamic-windows --sharedclient"
7979
8080# # Special compile flags
8181 compile_flags :
8282 debug : &compile_flags_debug
8383 compile_flags : " --dbg=on"
8484
85+ parallel_compile_flags :
86+ proc_parallel : ¶llel_compile_flags_proc
87+ parallel_compile_flags : " -j$(grep -c ^processor /proc/cpuinfo)"
88+ sysctl_parallel : ¶llel_compile_flags_sysctl
89+ parallel_compile_flags : " -j$(sysctl -n hw.logicalcpu)"
90+
8591 # # Scripts that are shared between buildvariants
8692 scripts :
8793 mongo_orchestration :
@@ -254,8 +260,6 @@ functions:
254260 working_dir : " mongo-cxx-driver"
255261 script : |
256262 ${start_mongo_orchestration}
257- ${scons|scons} ${scons_flags} ${warning_flags} ${compile_flags} ${toolchain_flags} ${extrapath} ${dllpath} ${cpppath} ${libpath} install # static lib install step
258- ${scons|scons} ${scons_flags} ${warning_flags} ${compile_flags} ${toolchain_flags} ${extrapath} ${dllpath} ${cpppath} ${libpath} check-install # static build installation header check
259263 ${scons|scons} ${scons_flags} ${warning_flags} ${compile_flags} ${toolchain_flags} ${extrapath} ${dllpath} ${cpppath} ${libpath} ${orchestration_preset} examples
260264
261265pre :
@@ -315,7 +319,7 @@ tasks:
315319 script : |
316320 set -o errexit
317321 set -o verbose
318- ${scons|scons} ${scons_flags} ${warning_flags} ${compile_flags} ${toolchain_flags} ${extrapath} ${dllpath} ${cpppath} ${libpath} ${compile_target|all}
322+ ${scons|scons} ${scons_flags} ${warning_flags} ${compile_flags} ${parallel_compile_flags} ${ toolchain_flags} ${extrapath} ${dllpath} ${cpppath} ${libpath} ${compile_target|all check-install }
319323 - command : shell.exec
320324 params :
321325 working_dir : " mongo-cxx-driver"
@@ -472,6 +476,7 @@ buildvariants:
472476 display_name : " RHEL 5.5"
473477 expansions :
474478 << : *scons_flags_64
479+ << : *parallel_compile_flags_proc
475480 << : *warning_flags_rhel55
476481 << : *cpppath_rhel55
477482 << : *libpath_rhel55_64
@@ -487,6 +492,7 @@ buildvariants:
487492 display_name : " RHEL 5.5 32-bit"
488493 expansions :
489494 << : *scons_flags_32
495+ << : *parallel_compile_flags_proc
490496 << : *warning_flags_rhel55
491497 << : *cpppath_rhel55
492498 << : *libpath_rhel55_32
@@ -502,6 +508,7 @@ buildvariants:
502508 display_name : " Ubuntu1404"
503509 expansions :
504510 << : *scons_flags_64
511+ << : *parallel_compile_flags_proc
505512 << : *mongo_url_ubuntu1404
506513 << : *mongo_orchestration_linux
507514 run_on :
@@ -514,6 +521,7 @@ buildvariants:
514521 display_name : " Ubuntu1404 dbg"
515522 expansions :
516523 << : *compile_flags_debug
524+ << : *parallel_compile_flags_proc
517525 << : *scons_flags_64
518526 << : *mongo_url_ubuntu1404
519527 << : *mongo_orchestration_linux
@@ -527,6 +535,7 @@ buildvariants:
527535 display_name : " Ubuntu1404 C++11"
528536 expansions :
529537 << : *scons_flags_cpp11
538+ << : *parallel_compile_flags_proc
530539 << : *mongo_url_ubuntu1404
531540 << : *mongo_orchestration_linux
532541 run_on :
@@ -544,6 +553,7 @@ buildvariants:
544553 expansions :
545554 << : *mongo_url_osx_108
546555 << : *scons_flags_osx_108
556+ << : *parallel_compile_flags_sysctl
547557 << : *extrapath_osx_108
548558 << : *mongo_orchestration_osx
549559 run_on :
@@ -562,9 +572,9 @@ buildvariants:
562572 expansions :
563573 << : *windows_common
564574 << : *scons_flags_32_windows_dynamic
575+ << : *parallel_compile_flags_proc
565576 << : *mongo_url_windows32
566577 << : *with_msvc2010_32bit
567- compile_target : driver build-unit
568578 run_on :
569579 - windows-64-compile
570580 tasks :
@@ -579,6 +589,7 @@ buildvariants:
579589 expansions :
580590 << : *windows_common
581591 << : *scons_flags_64_windows_static
592+ << : *parallel_compile_flags_proc
582593 << : *mongo_url_windows64
583594 << : *with_msvc2010
584595 run_on :
@@ -593,6 +604,7 @@ buildvariants:
593604 expansions :
594605 << : *windows_common
595606 << : *compile_flags_debug
607+ << : *parallel_compile_flags_proc
596608 << : *scons_flags_64_windows_dynamic
597609 << : *mongo_url_windows64
598610 << : *with_msvc2010
@@ -607,6 +619,7 @@ buildvariants:
607619 display_name : " Win64(2013) dyn-dyn"
608620 expansions :
609621 << : *windows_common
622+ << : *parallel_compile_flags_proc
610623 << : *scons_flags_64_windows_dynamic
611624 << : *mongo_url_windows64
612625 << : *with_msvc2013
@@ -621,6 +634,7 @@ buildvariants:
621634 display_name : " Win64(2013) static-dyn"
622635 expansions :
623636 << : *windows_common
637+ << : *parallel_compile_flags_proc
624638 << : *scons_flags_64_windows_dynamic_rt
625639 << : *mongo_url_windows64
626640 << : *with_msvc2013
0 commit comments