aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compilers.rb
diff options
context:
space:
mode:
authorJack Nagel2014-08-03 10:47:47 -0500
committerJack Nagel2014-08-03 10:47:47 -0500
commit8e8b9acc01545b6b6bbee9219ee4c1ef95e8c916 (patch)
tree255d06f32a57cf4d809470f73a1323cab33dee10 /Library/Homebrew/compilers.rb
parente5d6247ae7b33a76e90610c94d29b025d6be20fc (diff)
downloadbrew-8e8b9acc01545b6b6bbee9219ee4c1ef95e8c916.tar.bz2
Move compiler failure matching logic into failure object
Diffstat (limited to 'Library/Homebrew/compilers.rb')
-rw-r--r--Library/Homebrew/compilers.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb
index b9fb9e199..ad6c6b4c1 100644
--- a/Library/Homebrew/compilers.rb
+++ b/Library/Homebrew/compilers.rb
@@ -48,6 +48,12 @@ class CompilerFailure
instance_eval(&block) if block_given?
end
+ def ===(compiler)
+ name == compiler.name &&
+ major_version == compiler.major_version &&
+ version >= (compiler.version || 0)
+ end
+
MESSAGES = {
:cxx11 => "This compiler does not support C++11"
}