Added support for BML+mpi variant (#5563)
* Added support for BML+mpi variant Added support for BML+mpi variant. Currently restricted to master (develop) branch pending release of next bml tag * Update package.py Removing redundant statement * Update package.py Added explicit disabling of MPI when not requested
This commit is contained in:
parent
0d0d2663d2
commit
d3e4e88bae
1 changed files with 14 additions and 1 deletions
|
@ -38,12 +38,25 @@ class Bml(CMakePackage):
|
||||||
version('develop', git='https://github.com/lanl/bml', branch='master')
|
version('develop', git='https://github.com/lanl/bml', branch='master')
|
||||||
|
|
||||||
variant('shared', default=True, description='Build shared libs')
|
variant('shared', default=True, description='Build shared libs')
|
||||||
|
variant('mpi', default=False, description='Build with MPI Support')
|
||||||
|
|
||||||
|
conflicts('+mpi', when='@:1.2.2')
|
||||||
|
|
||||||
depends_on("blas")
|
depends_on("blas")
|
||||||
depends_on("lapack")
|
depends_on("lapack")
|
||||||
|
depends_on('mpi', when='+mpi')
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
return [
|
args = [
|
||||||
'-DBUILD_SHARED_LIBS={0}'.format(
|
'-DBUILD_SHARED_LIBS={0}'.format(
|
||||||
'ON' if '+shared' in self.spec else 'OFF')
|
'ON' if '+shared' in self.spec else 'OFF')
|
||||||
]
|
]
|
||||||
|
spec = self.spec
|
||||||
|
if '+mpi' in spec:
|
||||||
|
args.append('-DBML_MPI=True')
|
||||||
|
args.append('-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc)
|
||||||
|
args.append('-DCMAKE_CXX_COMPILER=%s' % spec['mpi'].mpicxx)
|
||||||
|
args.append('-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc)
|
||||||
|
else:
|
||||||
|
args.append('-DBML_MPI=False')
|
||||||
|
return args
|
||||||
|
|
Loading…
Reference in a new issue