Remove PATH hack from ENV.fortran
This commit is contained in:
parent
dbce25783c
commit
43bd5d44c2
@ -112,10 +112,6 @@ module SharedEnvExtension
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fortran
|
def fortran
|
||||||
# superenv removes these PATHs, but this option needs them
|
|
||||||
# TODO fix better, probably by making a super-fc
|
|
||||||
self['PATH'] += ":#{HOMEBREW_PREFIX}/bin:/usr/local/bin"
|
|
||||||
|
|
||||||
if self['FC']
|
if self['FC']
|
||||||
ohai "Building with an alternative Fortran compiler"
|
ohai "Building with an alternative Fortran compiler"
|
||||||
puts "This is unsupported."
|
puts "This is unsupported."
|
||||||
@ -138,11 +134,10 @@ module SharedEnvExtension
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
elsif which 'gfortran'
|
elsif (gfortran = which('gfortran', ORIGINAL_PATHS.join(File::PATH_SEPARATOR)))
|
||||||
ohai "Using Homebrew-provided fortran compiler."
|
ohai "Using Homebrew-provided fortran compiler."
|
||||||
puts "This may be changed by setting the FC environment variable."
|
puts "This may be changed by setting the FC environment variable."
|
||||||
self['FC'] = which 'gfortran'
|
self['FC'] = self['F77'] = gfortran
|
||||||
self['F77'] = self['FC']
|
|
||||||
|
|
||||||
FC_FLAG_VARS.each {|key| self[key] = cflags}
|
FC_FLAG_VARS.each {|key| self[key] = cflags}
|
||||||
set_cpu_flags(FC_FLAG_VARS)
|
set_cpu_flags(FC_FLAG_VARS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user