mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Fix Xcode version parsing error (affects bitcode generation)
The regex was only parsing for a single digit in the major version, causing Xcode 10 to be treated as version "1". Other parts of the script only turn on bitcode generation if the Xcode version is > 7.
This commit is contained in:
parent
4b895a4d1f
commit
3c5a6be835
@ -39,10 +39,11 @@ def execute(cmd, cwd = None):
|
|||||||
|
|
||||||
def getXCodeMajor():
|
def getXCodeMajor():
|
||||||
ret = check_output(["xcodebuild", "-version"])
|
ret = check_output(["xcodebuild", "-version"])
|
||||||
m = re.match(r'XCode\s+(\d)\..*', ret, flags=re.IGNORECASE)
|
m = re.match(r'Xcode\s+(\d+)\..*', ret, flags=re.IGNORECASE)
|
||||||
if m:
|
if m:
|
||||||
return int(m.group(1))
|
return int(m.group(1))
|
||||||
return 0
|
else:
|
||||||
|
raise Exception("Failed to parse Xcode version")
|
||||||
|
|
||||||
class Builder:
|
class Builder:
|
||||||
def __init__(self, opencv, contrib, dynamic, bitcodedisabled, exclude, targets):
|
def __init__(self, opencv, contrib, dynamic, bitcodedisabled, exclude, targets):
|
||||||
|
Loading…
Reference in New Issue
Block a user