New interface for passing build information among specs (#1875)
- Added a new interface for Specs to pass build information - Calls forwarded from Spec to Package are now explicit - Added descriptor within Spec to manage forwarding - Added state in Spec to maintain query information - Modified a few packages (the one involved in spack install pexsi) to showcase changes - This uses an object wrapper to `spec` to implement the `libs` sub-calls. - wrapper is returned from `__getitem__` only if spec is concrete - allows packagers to access build information easily
This commit is contained in:

committed by
Todd Gamblin

parent
5ce926d2d1
commit
ed582cef68
@@ -53,7 +53,7 @@ class SuperluDist(Package):
|
||||
depends_on('metis@5:')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
lapack_blas = spec['lapack'].lapack_libs + spec['blas'].blas_libs
|
||||
lapack_blas = spec['lapack'].libs + spec['blas'].libs
|
||||
makefile_inc = []
|
||||
makefile_inc.extend([
|
||||
'PLAT = _mac_x',
|
||||
@@ -61,17 +61,17 @@ def install(self, spec, prefix):
|
||||
'DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a',
|
||||
'BLASDEF = -DUSE_VENDOR_BLAS',
|
||||
'BLASLIB = %s' % lapack_blas.ld_flags,
|
||||
'METISLIB = -L%s -lmetis' % spec['metis'].prefix.lib,
|
||||
'PARMETISLIB = -L%s -lparmetis' % spec['parmetis'].prefix.lib,
|
||||
'METISLIB = %s' % spec['metis'].libs.ld_flags,
|
||||
'PARMETISLIB = %s' % spec['parmetis'].libs.ld_flags,
|
||||
'FLIBS =',
|
||||
'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)', # noqa
|
||||
'ARCH = ar',
|
||||
'ARCHFLAGS = cr',
|
||||
'RANLIB = true',
|
||||
'CC = {0}'.format(self.spec['mpi'].mpicc),
|
||||
'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s %s' % (
|
||||
spec['parmetis'].prefix.include,
|
||||
spec['metis'].prefix.include,
|
||||
'CFLAGS = -fPIC -std=c99 -O2 %s %s %s' % (
|
||||
spec['parmetis'].cppflags,
|
||||
spec['metis'].cppflags,
|
||||
'-D_LONGINT' if '+int64' in spec else ''),
|
||||
'NOOPTS = -fPIC -std=c99',
|
||||
'FORTRAN = {0}'.format(self.spec['mpi'].mpif77),
|
||||
|
Reference in New Issue
Block a user