superlu-mt: add pic and int64 variants (#11361)
* add pic and int64 variants * update to Language-specific PIC flags
This commit is contained in:
parent
56b4abbe38
commit
00fd63f5ee
@ -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 @@ def configure(self, spec):
|
||||
'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 @@ def configure(self, spec):
|
||||
'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:
|
||||
|
Loading…
Reference in New Issue
Block a user