diff options
author | Robert Pavel <rspavel@gmail.com> | 2017-10-02 12:51:06 -0600 |
---|---|---|
committer | Christoph Junghans <christoph.junghans@gmail.com> | 2017-10-02 12:51:06 -0600 |
commit | d3e4e88bae2b3ddf71bf56da18fe510e74e020b2 (patch) | |
tree | e4b3b73174599d64087d6809990f9ce78d64ed9b /var | |
parent | 0d0d2663d284e7cf063c58ee468df0052fa0a560 (diff) | |
download | spack-d3e4e88bae2b3ddf71bf56da18fe510e74e020b2.tar.gz spack-d3e4e88bae2b3ddf71bf56da18fe510e74e020b2.tar.bz2 spack-d3e4e88bae2b3ddf71bf56da18fe510e74e020b2.tar.xz spack-d3e4e88bae2b3ddf71bf56da18fe510e74e020b2.zip |
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
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/bml/package.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/bml/package.py b/var/spack/repos/builtin/packages/bml/package.py index 0131cf145e..31d08f89ec 100644 --- a/var/spack/repos/builtin/packages/bml/package.py +++ b/var/spack/repos/builtin/packages/bml/package.py @@ -38,12 +38,25 @@ class Bml(CMakePackage): version('develop', git='https://github.com/lanl/bml', branch='master') 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("lapack") + depends_on('mpi', when='+mpi') def cmake_args(self): - return [ + args = [ '-DBUILD_SHARED_LIBS={0}'.format( '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 |