parent
1cd3149677
commit
919aac0b89
@ -166,9 +166,9 @@ class FormulaAuditor
|
|||||||
when 'open-mpi', 'mpich2'
|
when 'open-mpi', 'mpich2'
|
||||||
problem <<-EOS.undent
|
problem <<-EOS.undent
|
||||||
There are multiple conflicting ways to install MPI. Use an MPIDependency:
|
There are multiple conflicting ways to install MPI. Use an MPIDependency:
|
||||||
depends_on MPIDependency.new(<lang list>)
|
depends_on :mpi => [<lang list>]
|
||||||
Where <lang list> is a comma delimited list that can include:
|
Where <lang list> is a comma delimited list that can include:
|
||||||
:cc, :cxx, :f90, :f77
|
:cc, :cxx, :f77, :f90
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -94,6 +94,7 @@ class DependencyCollector
|
|||||||
when :mysql then MysqlDependency.new(tags)
|
when :mysql then MysqlDependency.new(tags)
|
||||||
when :postgresql then PostgresqlDependency.new(tags)
|
when :postgresql then PostgresqlDependency.new(tags)
|
||||||
when :fortran then FortranDependency.new(tags)
|
when :fortran then FortranDependency.new(tags)
|
||||||
|
when :mpi then MPIDependency.new(*tags)
|
||||||
when :tex then TeXDependency.new(tags)
|
when :tex then TeXDependency.new(tags)
|
||||||
when :clt then CLTDependency.new(tags)
|
when :clt then CLTDependency.new(tags)
|
||||||
when :arch then ArchRequirement.new(tags)
|
when :arch then ArchRequirement.new(tags)
|
||||||
|
|||||||
@ -13,11 +13,14 @@ class MPIDependency < Requirement
|
|||||||
|
|
||||||
env :userpaths
|
env :userpaths
|
||||||
|
|
||||||
def initialize *lang_list
|
# This method must accept varargs rather than an array for
|
||||||
@lang_list = lang_list
|
# backwards compatibility with formulae that call it directly.
|
||||||
|
def initialize(*tags)
|
||||||
@non_functional = []
|
@non_functional = []
|
||||||
@unknown_langs = []
|
@unknown_langs = []
|
||||||
super()
|
@lang_list = [:cc, :cxx, :f77, :f90] & tags
|
||||||
|
tags -= @lang_list
|
||||||
|
super(tags)
|
||||||
end
|
end
|
||||||
|
|
||||||
def mpi_wrapper_works? compiler
|
def mpi_wrapper_works? compiler
|
||||||
|
|||||||
12
Library/Homebrew/test/test_mpi_dependency.rb
Normal file
12
Library/Homebrew/test/test_mpi_dependency.rb
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
require 'testing_env'
|
||||||
|
require 'requirements/mpi_dependency'
|
||||||
|
|
||||||
|
class MPIDependencyTests < Test::Unit::TestCase
|
||||||
|
def test_initialize_untangles_tags_and_wrapper_symbols
|
||||||
|
wrappers = [:cc, :cxx, :f77]
|
||||||
|
tags = [:optional, 'some-other-tag']
|
||||||
|
dep = MPIDependency.new(*wrappers + tags)
|
||||||
|
assert_equal wrappers, dep.lang_list
|
||||||
|
assert_equal tags, dep.tags
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user