aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-08-16 02:05:13 -0500
committerJack Nagel2014-08-16 02:16:05 -0500
commitcfec45a434c94a86a023bd9592cd73cfa74d898c (patch)
tree78cf5410863c12c0d732c7a8100134af6ace732c /Library/Homebrew
parent8a98d4b09c0c224c7c7ec1a2f0e0c9ff966cfe40 (diff)
downloadhomebrew-cfec45a434c94a86a023bd9592cd73cfa74d898c.tar.bz2
Simplify cxxstdlib_check implementation
The cxxstdlib_check method currently only supports one value, so we can just define the accompanying instance method when necessary. If we ever add more options we can back it with a data structure.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/compat/formula.rb4
-rw-r--r--Library/Homebrew/formula.rb13
2 files changed, 3 insertions, 14 deletions
diff --git a/Library/Homebrew/compat/formula.rb b/Library/Homebrew/compat/formula.rb
index 11f65e36d..40469da33 100644
--- a/Library/Homebrew/compat/formula.rb
+++ b/Library/Homebrew/compat/formula.rb
@@ -16,10 +16,6 @@ class Formula
"-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev"
end
- def cxxstdlib
- self.class.cxxstdlib
- end
-
def cxxstdlib_check check_type
self.class.cxxstdlib_check check_type
end
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 2774f23ca..852e85b80 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -245,7 +245,7 @@ class Formula
end
def skip_cxxstdlib_check?
- self.class.cxxstdlib.include?(:skip)
+ false
end
def require_universal_deps?
@@ -712,16 +712,9 @@ class Formula
@keg_only_reason = KegOnlyReason.new(reason, explanation)
end
- # Flag for marking whether this formula needs C++ standard library
- # compatibility check
- def cxxstdlib
- @cxxstdlib ||= Set.new
- end
-
- # Explicitly request changing C++ standard library compatibility check
- # settings. Use with caution!
+ # Pass :skip to this method to disable post-install stdlib checking
def cxxstdlib_check check_type
- cxxstdlib << check_type
+ define_method(:skip_cxxstdlib_check?) { true } if check_type == :skip
end
# For Apple compilers, this should be in the format: