diff options
| author | Xiyue Deng | 2013-10-28 02:16:42 -0700 | 
|---|---|---|
| committer | Xiyue Deng | 2013-11-02 17:30:05 -0700 | 
| commit | 917b94df98ad03e88bef54b2fd944b7bc0e25f31 (patch) | |
| tree | 0fd49258251c8f41f554cf3007a7a8a9e8cb4ac9 /Library/Homebrew/formula.rb | |
| parent | 6fc6dd791badba63e708623c6db5ecd3d8cb4ac6 (diff) | |
| download | brew-917b94df98ad03e88bef54b2fd944b7bc0e25f31.tar.bz2 | |
Add cxxstdlib_check method to request changing C++ stdlib checking.
* In certain cases, a C++ software may result in linking to a different
  and incompatible C++ standard library than its dependencies and still
  works fine because it is by design. Examples include GCC, which will
  bootstrap itself and self-host after finish.
* Add a cxxstdlib_check method to formula to request changing the C++
  standard library checking. Currently using "cxxstdlib_check :skip"
  will let a formula skip such checking. This should only be used on
  rare occasions and be very careful.
Closes Homebrew/homebrew#23687.
Diffstat (limited to 'Library/Homebrew/formula.rb')
| -rw-r--r-- | Library/Homebrew/formula.rb | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index fd1884e4f..a760e7fc2 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -25,6 +25,10 @@ class Formula    attr_accessor :local_bottle_path +  # Flag for marking whether this formula needs C++ standard library +  # compatibility check +  attr_reader :cxxstdlib +    # Homebrew determines the name    def initialize name='__UNKNOWN__', path=nil      @name = name @@ -52,6 +56,8 @@ class Formula      @build = determine_build_options      @pin = FormulaPin.new(self) + +    @cxxstdlib ||= Set.new    end    def set_spec(name) @@ -643,6 +649,12 @@ class Formula      end    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  | 
