trilinos : updated package to meet changes in dependencies
This commit is contained in:
@@ -10,6 +10,7 @@ class Trilinos(Package):
|
||||
homepage = "https://trilinos.org/"
|
||||
url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz"
|
||||
|
||||
version('12.4.2', '7c830f7f0f68b8ad324690603baf404e')
|
||||
version('12.2.1', '6161926ea247863c690e927687f83be9')
|
||||
version('12.0.1', 'bd99741d047471e127b8296b2ec08017')
|
||||
version('11.14.3', '2f4f83f8333e4233c57d0f01c4b57426')
|
||||
@@ -17,33 +18,38 @@ class Trilinos(Package):
|
||||
version('11.14.1', '40febc57f76668be8b6a77b7607bb67f')
|
||||
|
||||
variant('mpi', default=True, description='Add a dependency on MPI and enables MPI dependent packages')
|
||||
variant('shared', default=True, description='Enables the build of shared libraries')
|
||||
variant('debug', default=False, description='Builds a debug version of the libraries')
|
||||
|
||||
# Everything should be compiled with -fpic
|
||||
depends_on('blas')
|
||||
depends_on('lapack')
|
||||
depends_on('boost')
|
||||
depends_on('netcdf')
|
||||
depends_on('matio')
|
||||
depends_on('glm')
|
||||
depends_on('swig')
|
||||
|
||||
# MPI related dependencies
|
||||
depends_on('mpi', when='+mpi')
|
||||
depends_on('netcdf+mpi', when='+mpi')
|
||||
depends_on('netcdf~mpi', when='~mpi')
|
||||
|
||||
depends_on('python') # Needs py-numpy activated
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
options = [
|
||||
'-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON',
|
||||
'-DTrilinos_ENABLE_TESTS:BOOL=OFF',
|
||||
'-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF',
|
||||
'-DBUILD_SHARED_LIBS:BOOL=ON',
|
||||
'-DBLAS_LIBRARY_DIRS:PATH=%s' % spec['blas'].prefix,
|
||||
'-DLAPACK_LIBRARY_DIRS:PATH=%s' % spec['lapack'].prefix
|
||||
]
|
||||
if '+mpi' in spec:
|
||||
mpi_options = ['-DTPL_ENABLE_MPI:BOOL=ON']
|
||||
options.extend(mpi_options)
|
||||
|
||||
# -DCMAKE_INSTALL_PREFIX and all the likes...
|
||||
options = []
|
||||
options.extend(std_cmake_args)
|
||||
|
||||
options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON',
|
||||
'-DTrilinos_ENABLE_TESTS:BOOL=OFF',
|
||||
'-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF',
|
||||
'-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'),
|
||||
'-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'),
|
||||
'-DTPL_ENABLE_MPI:BOOL=%s' % ('ON' if '+mpi' in spec else 'OFF'),
|
||||
'-DBLAS_LIBRARY_DIRS:PATH=%s' % spec['blas'].prefix,
|
||||
'-DLAPACK_LIBRARY_DIRS:PATH=%s' % spec['lapack'].prefix
|
||||
])
|
||||
|
||||
with working_dir('spack-build', create=True):
|
||||
cmake('..', *options)
|
||||
make()
|
||||
|
Reference in New Issue
Block a user