@@ -201,6 +201,7 @@ def setup_options(docopt_args):
201201 Options .ninja_jobs = int (multiprocessing .cpu_count () / 2 )
202202 if Options .ninja_jobs < 1 :
203203 Options .ninja_jobs = 1
204+ Options .ninja_jobs = str (Options .ninja_jobs )
204205
205206
206207def build_cef ():
@@ -410,9 +411,11 @@ def build_cef_projects():
410411 # > cefclient_mac.mm:22:29: error: property 'mainMenu' not found
411412 if MAC :
412413 # Build only cefsimple
413- command .extend (["ninja" , "cefsimple" ])
414+ command .extend (["ninja" , "-j" , Options .ninja_jobs ,
415+ "cefsimple" ])
414416 else :
415- command .extend (["ninja" , "cefclient" , "cefsimple" , "ceftests" ])
417+ command .extend (["ninja" , "-j" , Options .ninja_jobs ,
418+ "cefclient" , "cefsimple" , "ceftests" ])
416419 run_command (command , build_cefclient_dir )
417420 print ("[automate.py] OK" )
418421 assert os .path .exists (cefclient_exe )
@@ -507,7 +510,8 @@ def build_wrapper_library_windows(runtime_library, msvs, vcvars):
507510
508511 # Run ninja
509512 ninja_wrapper = prepare_build_command (build_lib = True , vcvars = vcvars )
510- ninja_wrapper .extend (["ninja" , "libcef_dll_wrapper" ])
513+ ninja_wrapper .extend (["ninja" , "-j" , Options .ninja_jobs ,
514+ "libcef_dll_wrapper" ])
511515 run_command (ninja_wrapper , working_dir = build_wrapper_dir )
512516 print ("[automate.py] ninja OK" )
513517 assert os .path .exists (wrapper_lib )
@@ -630,7 +634,8 @@ def build_wrapper_library_mac():
630634 print ("[automate.py] cmake OK" )
631635 # Ninja
632636 ninja_wrapper = prepare_build_command (build_lib = True )
633- ninja_wrapper .extend (["ninja" , "libcef_dll_wrapper" ])
637+ ninja_wrapper .extend (["ninja" , "-j" , Options .ninja_jobs ,
638+ "libcef_dll_wrapper" ])
634639 run_command (ninja_wrapper , build_wrapper_dir )
635640 print ("[automate.py] ninja OK" )
636641 assert os .path .exists (wrapper_lib )
0 commit comments