Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
netCDF: option for C++ bindings
Browse files Browse the repository at this point in the history
Closes #15264.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information
dongli authored and adamv committed Oct 3, 2012
1 parent 2183707 commit 752afd1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Library/Formula/netcdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ class NetcdfCXX < Formula
sha1 '59628c9f06c211a47517fc00d8b068da159ffa9d'
end

class NetcdfCXX_compat < Formula
homepage 'http://www.unidata.ucar.edu/software/netcdf'
url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz'
sha1 'bab9b2d873acdddbdbf07ab35481cd0267a3363b'
end

class NetcdfFortran < Formula
homepage 'http://www.unidata.ucar.edu/software/netcdf'
url 'http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.2.tar.gz'
Expand All @@ -19,8 +25,9 @@ class Netcdf < Formula

depends_on 'hdf5'

option 'enable-fortran', 'Compile Fortran Bindings'
option 'enable-fortran', 'Compile Fortran bindings'
option 'disable-cxx', "Don't compile C++ bindings"
option 'enable-cxx-compat', 'Compile C++ bindings for compatibility'

def install
if build.include? 'enable-fortran'
Expand Down Expand Up @@ -56,6 +63,11 @@ def install
system 'make install'
end unless build.include? 'disable-cxx'

NetcdfCXX_compat.new.brew do
system './configure', *common_args
system 'make install'
end if build.include? 'enable-cxx-compat'

NetcdfFortran.new.brew do
system './configure', *common_args
system 'make install'
Expand Down

0 comments on commit 752afd1

Please sign in to comment.