Create method for accessing Xcode version.
This commit is contained in:
parent
dae5a4477b
commit
f8127143cf
@ -18,8 +18,7 @@ module Homebrew extend self
|
|||||||
end
|
end
|
||||||
|
|
||||||
def xcode_version
|
def xcode_version
|
||||||
`xcodebuild -version 2>&1` =~ /Xcode (\d(\.\d)*)/
|
@xcode_version || MacOS.xcode_version
|
||||||
$1
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def llvm_recommendation
|
def llvm_recommendation
|
||||||
|
|||||||
@ -271,6 +271,11 @@ module MacOS extend self
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def xcode_version
|
||||||
|
`xcodebuild -version 2>&1` =~ /Xcode (\d(\.\d)*)/
|
||||||
|
$1
|
||||||
|
end
|
||||||
|
|
||||||
def llvm_build_version
|
def llvm_build_version
|
||||||
unless xcode_prefix.to_s.empty?
|
unless xcode_prefix.to_s.empty?
|
||||||
llvm_gcc_path = xcode_prefix/"usr/bin/llvm-gcc"
|
llvm_gcc_path = xcode_prefix/"usr/bin/llvm-gcc"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user