aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMartin Afanasjew2015-12-18 17:04:58 +0100
committerMartin Afanasjew2015-12-23 06:54:04 +0100
commit8e4fad89691840d19e87a099e36ad474d9de54b0 (patch)
treeeff9a21d3507344039763d172059285d30bc1353 /Library
parentf0a370ea12f5b65faa361bb8f40c45bd1513aede (diff)
downloadbrew-8e4fad89691840d19e87a099e36ad474d9de54b0.tar.bz2
ENV: avoid misleading Fortran setup warnings
Fixes Homebrew/homebrew#31156. Closes Homebrew/homebrew#47246. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV/shared.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb
index 57b9a7f1e..19af48698 100644
--- a/Library/Homebrew/extend/ENV/shared.rb
+++ b/Library/Homebrew/extend/ENV/shared.rb
@@ -203,6 +203,12 @@ module SharedEnvExtension
end
def fortran
+ # Ignore repeated calls to this function as it will misleadingly warn about
+ # building with an alternative Fortran compiler without optimization flags,
+ # despite it often being the Homebrew-provided one set up in the first call.
+ return if @fortran_setup_done
+ @fortran_setup_done = true
+
flags = []
if fc