Use MacOS.xcode_prefix
This commit is contained in:
parent
8f7972c194
commit
89720e1d20
@ -18,15 +18,13 @@ module HomebrewEnvExtension
|
|||||||
self['CMAKE_PREFIX_PATH'] = "#{HOMEBREW_PREFIX}"
|
self['CMAKE_PREFIX_PATH'] = "#{HOMEBREW_PREFIX}"
|
||||||
end
|
end
|
||||||
|
|
||||||
xcode_path = `/usr/bin/xcode-select -print-path`.chomp
|
|
||||||
xcode_path = "/Developer" if xcode_path.to_s.empty?
|
|
||||||
if MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm')
|
if MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm')
|
||||||
self['CC'] = "#{xcode_path}/usr/bin/llvm-gcc"
|
self['CC'] = "#{MacOS.xcode_prefix}/usr/bin/llvm-gcc"
|
||||||
self['CXX'] = "#{xcode_path}/usr/bin/llvm-g++"
|
self['CXX'] = "#{MacOS.xcode_prefix}/usr/bin/llvm-g++"
|
||||||
cflags = ['-O4'] # link time optimisation baby!
|
cflags = ['-O4'] # link time optimisation baby!
|
||||||
elsif MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_GCC'] or ARGV.include? '--use-gcc')
|
elsif MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_GCC'] or ARGV.include? '--use-gcc')
|
||||||
self['CC'] = "#{xcode_path}/usr/bin/gcc"
|
self['CC'] = "#{MacOS.xcode_prefix}/usr/bin/gcc"
|
||||||
self['CXX'] = "#{xcode_path}/usr/bin/g++"
|
self['CXX'] = "#{MacOS.xcode_prefix}/usr/bin/g++"
|
||||||
cflags = ['-O3']
|
cflags = ['-O3']
|
||||||
else
|
else
|
||||||
# If these aren't set, many formulae fail to build
|
# If these aren't set, many formulae fail to build
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user