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
@@ -88,12 +88,10 @@ def install(self, spec, prefix):
|
||||
cppflags = [
|
||||
'-D__FFTW3',
|
||||
'-D__LIBINT',
|
||||
'-I' + spec['fftw'].prefix.include
|
||||
spec['fftw'].cppflags
|
||||
]
|
||||
fcflags = copy.deepcopy(optflags[self.spec.compiler.name])
|
||||
fcflags.extend([
|
||||
'-I' + spec['fftw'].prefix.include
|
||||
])
|
||||
fcflags.append(spec['fftw'].cppflags)
|
||||
fftw = find_libraries(['libfftw3'], root=spec['fftw'].prefix.lib)
|
||||
ldflags = [fftw.search_flags]
|
||||
libs = [
|
||||
@@ -154,15 +152,17 @@ def install(self, spec, prefix):
|
||||
'-D__SCALAPACK'
|
||||
])
|
||||
fcflags.extend([
|
||||
# spec['elpa:fortran'].cppflags
|
||||
'-I' + join_path(
|
||||
spec['elpa'].prefix,
|
||||
'include',
|
||||
'elpa-{0}'.format(str(spec['elpa'].version)),
|
||||
'modules'
|
||||
),
|
||||
# spec[pexsi:fortran].cppflags
|
||||
'-I' + join_path(spec['pexsi'].prefix, 'fortran')
|
||||
])
|
||||
scalapack = spec['scalapack'].scalapack_libs
|
||||
scalapack = spec['scalapack'].libs
|
||||
ldflags.append(scalapack.search_flags)
|
||||
libs.extend([
|
||||
join_path(spec['elpa'].prefix.lib,
|
||||
@@ -184,8 +184,8 @@ def install(self, spec, prefix):
|
||||
libs.extend(self.spec['mpi'].mpicxx_shared_libs)
|
||||
libs.extend(self.compiler.stdcxx_libs)
|
||||
# LAPACK / BLAS
|
||||
lapack = spec['lapack'].lapack_libs
|
||||
blas = spec['blas'].blas_libs
|
||||
lapack = spec['lapack'].libs
|
||||
blas = spec['blas'].libs
|
||||
|
||||
ldflags.append((lapack + blas).search_flags)
|
||||
libs.extend([str(x) for x in (fftw, lapack, blas)])
|
||||
|
Reference in New Issue
Block a user