Skip to content

Commit

Permalink
Update CGNS to 3.1.4-2 and add tests.
Browse files Browse the repository at this point in the history
Closes #522.
  • Loading branch information
wdeconinck authored and dpo committed Nov 28, 2013
1 parent 1e8eadc commit 3615d37
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions cgns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,33 @@

class Cgns < Formula
homepage 'http://cgns.sourceforge.net'
url 'http://downloads.sourceforge.net/project/cgns/cgnslib_3.1/cgnslib_3.1.3-4.tar.gz'
version '3.1.3.4' # Release d of version a.b.c (we add the release to the version)
sha1 '148396af2b9f6b6b273561cf4e474e667adc7508'
url 'http://sourceforge.net/projects/cgns/files/cgnslib_3.1/cgnslib_3.1.4-2.tar.gz'
version '3.1.4.2'
sha1 '26c16ce5d01264aab208a588b636f1de6de4bb1f'

depends_on :fortran
depends_on 'cmake' => :build
depends_on 'hdf5'
depends_on 'szip'

def install
args = std_cmake_args + [
'-DENABLE_FORTRAN=YES',
'-DENABLE_HDF5=YES',
'-DHDF5_NEED_ZIP=YES',
'-DCMAKE_SHARED_LINKER_FLAGS=-lhdf5'
'-DHDF5_NEED_SZIP=YES',
'-DHDF5_NEED_ZLIB=YES',
'-DCMAKE_SHARED_LINKER_FLAGS=-lhdf5',
'-DENABLE_TESTS=YES'
]

args << '-DENABLE64_BIT' if Hardware.is_64_bit? and MacOS.version >= :snow_leopard
args << '-DENABLE_64BIT=ON' if Hardware.is_64_bit? and MacOS.version >= :snow_leopard

mkdir 'build' do
system 'cmake', '..', *args
system 'make'
system 'ctest --output-on-failure'
system 'make install'
end
end

end

0 comments on commit 3615d37

Please sign in to comment.