mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Use all available cpu cores in iOS/OSX build procedure
This commit is contained in:
parent
04573615c5
commit
4f6238aa04
@ -28,7 +28,7 @@ Adding --dynamic parameter will build opencv2.framework as App Store dynamic fra
|
||||
"""
|
||||
|
||||
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):
|
||||
@ -166,7 +166,7 @@ class Builder:
|
||||
"-sdk", target.lower(),
|
||||
"-configuration", "Release",
|
||||
"-parallelizeTargets",
|
||||
"-jobs", "4",
|
||||
"-jobs", multiprocessing.cpu_count(),
|
||||
] + (["-target","ALL_BUILD"] if self.dynamic else [])
|
||||
|
||||
return buildcmd
|
||||
|
@ -4,7 +4,7 @@ The script builds OpenCV.framework for OSX.
|
||||
"""
|
||||
|
||||
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'))
|
||||
@ -23,7 +23,7 @@ class OSXBuilder(Builder):
|
||||
"-sdk", target.lower(),
|
||||
"-configuration", "Release",
|
||||
"-parallelizeTargets",
|
||||
"-jobs", "4"
|
||||
"-jobs", multiprocessing.cpu_count()
|
||||
]
|
||||
return buildcmd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user