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:
Massimiliano Culpo
2017-03-02 19:01:29 +01:00
committed by Todd Gamblin
parent 5ce926d2d1
commit ed582cef68
45 changed files with 390 additions and 148 deletions

View File

@@ -48,7 +48,7 @@ class Superlu(Package):
def install(self, spec, prefix):
cmake_args = [
'-Denable_blaslib=OFF',
'-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].blas_libs.joined())
'-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].libs.joined())
]
if '+fpic' in spec:
@@ -76,7 +76,7 @@ def install(self, spec, prefix):
'SUPERLULIB = $(SuperLUroot)/lib/libsuperlu_{0}.a' \
.format(self.spec.version),
'BLASDEF = -DUSE_VENDOR_BLAS',
'BLASLIB = {0}'.format(spec['blas'].blas_libs.ld_flags),
'BLASLIB = {0}'.format(spec['blas'].libs.ld_flags),
# or BLASLIB = -L/usr/lib64 -lblas
'TMGLIB = libtmglib.a',
'LIBS = $(SUPERLULIB) $(BLASLIB)',