Skip to content

Commit

Permalink
Use all available cpu cores in iOS/OSX build procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
ysolovyov committed May 2, 2017
1 parent 0457361 commit 4f6238a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions platforms/ios/build_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"""

from __future__ import print_function
import glob, re, os, os.path, shutil, string, sys, argparse, traceback
import glob, re, os, os.path, shutil, string, sys, argparse, traceback, multiprocessing
from subprocess import check_call, check_output, CalledProcessError

def execute(cmd, cwd = None):
Expand Down Expand Up @@ -166,7 +166,7 @@ def getBuildCommand(self, archs, target):
"-sdk", target.lower(),
"-configuration", "Release",
"-parallelizeTargets",
"-jobs", "4",
"-jobs", multiprocessing.cpu_count(),
] + (["-target","ALL_BUILD"] if self.dynamic else [])

return buildcmd
Expand Down
4 changes: 2 additions & 2 deletions platforms/osx/build_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""

from __future__ import print_function
import os, os.path, sys, argparse, traceback
import os, os.path, sys, argparse, traceback, multiprocessing

# import common code
sys.path.insert(0, os.path.abspath(os.path.abspath(os.path.dirname(__file__))+'/../ios'))
Expand All @@ -23,7 +23,7 @@ def getBuildCommand(self, archs, target):
"-sdk", target.lower(),
"-configuration", "Release",
"-parallelizeTargets",
"-jobs", "4"
"-jobs", multiprocessing.cpu_count()
]
return buildcmd

Expand Down

0 comments on commit 4f6238a

Please sign in to comment.