Skip to content
Snippets Groups Projects
Commit 249aae17 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

formula: move cxxstdlib methods to the class.

This allows disabling this checks when e.g. pouring bottles.
parent 6cdc7645
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,14 @@ 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
def self.bottle_sha1(*)
end
......
......@@ -33,7 +33,7 @@ class CxxStdlib
end
def check_dependencies(formula, deps)
unless formula.cxxstdlib.include? :skip
unless formula.class.cxxstdlib.include? :skip
deps.each do |dep|
# Software is unlikely to link against anything from its
# buildtime deps, so it doesn't matter at all if they link
......
......@@ -439,12 +439,6 @@ class Formula
Requirement.expand(self, &block)
end
# Flag for marking whether this formula needs C++ standard library
# compatibility check
def cxxstdlib
@cxxstdlib ||= Set.new
end
def to_hash
hsh = {
"name" => name,
......@@ -607,12 +601,6 @@ class Formula
active_spec.patches.each(&:apply)
end
# Explicitly request changing C++ standard library compatibility check
# settings. Use with caution!
def cxxstdlib_check check_type
cxxstdlib << check_type
end
def self.method_added method
case method
when :brew
......@@ -730,6 +718,18 @@ class Formula
@keg_only_reason = KegOnlyReason.new(reason, explanation.to_s.chomp)
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!
def cxxstdlib_check check_type
cxxstdlib << check_type
end
# For Apple compilers, this should be in the format:
# fails_with compiler do
# cause "An explanation for why the build doesn't work."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment