diff options
| author | Jack Nagel | 2013-06-26 22:08:54 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2013-06-26 22:18:13 -0500 | 
| commit | ce0b989c636c65c6cdf643fb06062a3edc3506c0 (patch) | |
| tree | 4c7d85a1d4234b94bde97b1882b9730cd8336ef2 /Library/Homebrew/requirements/mpi_dependency.rb | |
| parent | 81da4db0a9ce733755f4543384e3553081dc732d (diff) | |
| download | homebrew-ce0b989c636c65c6cdf643fb06062a3edc3506c0.tar.bz2 | |
Add syntax sugar for MPIDependency
Closes #20797.
Diffstat (limited to 'Library/Homebrew/requirements/mpi_dependency.rb')
| -rw-r--r-- | Library/Homebrew/requirements/mpi_dependency.rb | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/requirements/mpi_dependency.rb b/Library/Homebrew/requirements/mpi_dependency.rb index 28a03d566..2baf9a904 100644 --- a/Library/Homebrew/requirements/mpi_dependency.rb +++ b/Library/Homebrew/requirements/mpi_dependency.rb @@ -13,11 +13,14 @@ class MPIDependency < Requirement    env :userpaths -  def initialize *lang_list -    @lang_list = lang_list +  # This method must accept varargs rather than an array for +  # backwards compatibility with formulae that call it directly. +  def initialize(*tags)      @non_functional = []      @unknown_langs = [] -    super() +    @lang_list = [:cc, :cxx, :f77, :f90] & tags +    tags -= @lang_list +    super(tags)    end    def mpi_wrapper_works? compiler  | 
