Massive conversion from Package to CMakePackage (#4975)
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class Cgns(Package):
|
||||
class Cgns(CMakePackage):
|
||||
"""The CFD General Notation System (CGNS) provides a general, portable,
|
||||
and extensible standard for the storage and retrieval of computational
|
||||
fluid dynamics (CFD) analysis data."""
|
||||
@@ -37,11 +37,12 @@ class Cgns(Package):
|
||||
|
||||
variant('hdf5', default=True, description='Enable HDF5 interface')
|
||||
|
||||
depends_on('cmake', type='build')
|
||||
depends_on('cmake@2.8:', type='build')
|
||||
depends_on('hdf5', when='+hdf5')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
cmake_args = std_cmake_args[:]
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
cmake_args = []
|
||||
|
||||
if self.compiler.f77 and self.compiler.fc:
|
||||
cmake_args.append('-DCGNS_ENABLE_FORTRAN=ON')
|
||||
@@ -66,8 +67,4 @@ def install(self, spec, prefix):
|
||||
else:
|
||||
cmake_args.append('-DCGNS_ENABLE_HDF5=OFF')
|
||||
|
||||
with working_dir('spack-build', create=True):
|
||||
cmake('..', *cmake_args)
|
||||
|
||||
make()
|
||||
make('install')
|
||||
return cmake_args
|
||||
|
Reference in New Issue
Block a user