aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorLi Dong2013-02-01 19:54:03 +0800
committerAdam Vandenberg2013-02-01 09:23:47 -0800
commit37349fb6ffb7f8e11e10acebe3f46774541ef3f3 (patch)
treeef8cc2c74c9e60ceb5f08c1e09af8fa1f30540ec /Library
parent5c7b3bf0c8540fbdab74e6ae70402b25a236433f (diff)
downloadhomebrew-37349fb6ffb7f8e11e10acebe3f46774541ef3f3.tar.bz2
hdf5: Add enable-parallel option
Closes #17498. Closes #16393. Closes #17244. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/hdf5.rb16
1 files changed, 13 insertions, 3 deletions
diff --git a/Library/Formula/hdf5.rb b/Library/Formula/hdf5.rb
index daf70e1ad..6fbf60f9a 100644
--- a/Library/Formula/hdf5.rb
+++ b/Library/Formula/hdf5.rb
@@ -5,12 +5,15 @@ class Hdf5 < Formula
url 'http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.9/src/hdf5-1.8.9.tar.bz2'
sha1 '7d5e5e8caa5970c65e70a5b4ad6787efe0bf70bb'
- depends_on 'szip'
-
# TODO - warn that these options conflict
option :universal
option 'enable-fortran', 'Compile Fortran bindings'
+ option 'enable-cxx', 'Compile C++ bindings'
option 'enable-threadsafe', 'Trade performance and C++ or Fortran support for thread safety'
+ option 'enable-parallel', 'Compile parallel bindings'
+
+ depends_on 'szip'
+ depends_on MPIDependency.new(:cc, :cxx, :f90) if build.include? "enable-parallel"
def install
ENV.universal_binary if build.universal?
@@ -26,16 +29,23 @@ class Hdf5 < Formula
--enable-shared=yes
]
+ args << '--enable-parallel' if build.include? 'enable-parallel'
if build.include? 'enable-threadsafe'
args.concat %w[--with-pthread=/usr --enable-threadsafe]
else
- args << '--enable-cxx'
+ if build.include? 'enable-cxx'
+ args << '--enable-cxx'
+ end
if build.include? 'enable-fortran'
args << '--enable-fortran'
ENV.fortran
end
end
+ if build.include? 'enable-parallel'
+ ENV['CC'] = 'mpicc'
+ ENV['FC'] = 'mpif90'
+ end
system "./configure", *args
system "make install"
end