diff options
author | David Gardner <gardner48@llnl.gov> | 2020-06-27 07:52:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-27 09:52:32 -0500 |
commit | 00fd63f5ee5592e0afdc53ab4253319691d209cc (patch) | |
tree | adbb912a4da054542b249e09ee88dd7a7018750c /var | |
parent | 56b4abbe38379b7fe2c832b169e0117d76c21c6c (diff) | |
download | spack-00fd63f5ee5592e0afdc53ab4253319691d209cc.tar.gz spack-00fd63f5ee5592e0afdc53ab4253319691d209cc.tar.bz2 spack-00fd63f5ee5592e0afdc53ab4253319691d209cc.tar.xz spack-00fd63f5ee5592e0afdc53ab4253319691d209cc.zip |
superlu-mt: add pic and int64 variants (#11361)
* add pic and int64 variants
* update to Language-specific PIC flags
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/superlu-mt/package.py | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/superlu-mt/package.py b/var/spack/repos/builtin/packages/superlu-mt/package.py index 889e95f5bb..8f0e39d3aa 100644 --- a/var/spack/repos/builtin/packages/superlu-mt/package.py +++ b/var/spack/repos/builtin/packages/superlu-mt/package.py @@ -18,11 +18,16 @@ class SuperluMt(Package): version('3.1', sha256='407b544b9a92b2ed536b1e713e80f986824cf3016657a4bfc2f3e7d2a76ecab6') + variant('int64', default=False, + description='Build with 64 bit integers') + variant('pic', default=True, + description='Build with position independent code') variant('blas', default=True, description='Build with external BLAS library') # Must choose one or the other - variant('openmp', default=False, description='Build with OpenMP support') + variant('openmp', default=False, + description='Build with OpenMP support') variant('pthread', default=True, description='Build with POSIX threads support') @@ -85,7 +90,7 @@ class SuperluMt(Package): 'PREDEFS = -D_$(PLAT)', # Compilers and flags 'CC = {0}'.format(os.environ['CC']), - 'CFLAGS += $(PREDEFS) -D_LONGINT', + 'CFLAGS += $(PREDEFS)', 'NOOPTS = -O0', 'FORTRAN = {0}'.format(os.environ['FC']), 'LOADER = {0}'.format(os.environ['CC']), @@ -93,6 +98,19 @@ class SuperluMt(Package): 'CDEFS = -DAdd_' ]) + if '+int64' in spec: + config.extend([ + 'CFLAGS += -D_LONGINT', + ]) + + if '+pic' in spec: + config.extend([ + 'CFLAGS += {0}'.format(self.compiler.cc_pic_flag), + 'NOOPTS += {0}'.format(self.compiler.cc_pic_flag), + 'FFLAGS += {0}'.format(self.compiler.f77_pic_flag), + 'LOADOPTS += {0}'.format(self.compiler.cc_pic_flag) + ]) + # Write configuration options to include file with open('make.inc', 'w') as inc: for option in config: |