MpiP: adding variant to build shared libraries (#10410)

This commit is contained in:
Brian Homerding 2020-03-27 06:07:57 -05:00 committed by GitHub
parent e1238bae90
commit 420b5dd4b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,11 +16,21 @@ class Mpip(AutotoolsPackage):
version('master', branch='master')
version("3.4.1", sha256="688bf37d73211e6a915f9fc59c358282a266d166c0a10af07a38a01a473296f0")
variant('shared', default=False, description="Build the shared library")
depends_on("elf")
depends_on("libdwarf")
depends_on('libunwind', when=os.uname()[4] == "x86_64")
depends_on("mpi")
@property
def build_targets(self):
targets = []
if '+shared' in self.spec:
targets.append('shared')
return targets
def configure_args(self):
config_args = ['--without-f77']
config_args.append("--with-cc=%s" % self.spec['mpi'].mpicc)