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
@@ -112,8 +112,7 @@ def install(self, spec, prefix):
|
||||
make("install")
|
||||
self.install_test()
|
||||
|
||||
@property
|
||||
def blas_libs(self):
|
||||
def libs(self):
|
||||
# libsatlas.[so,dylib,dll ] contains all serial APIs (serial lapack,
|
||||
# serial BLAS), and all ATLAS symbols needed to support them. Whereas
|
||||
# libtatlas.[so,dylib,dll ] is parallel (multithreaded) version.
|
||||
@@ -135,10 +134,6 @@ def blas_libs(self):
|
||||
to_find, root=self.prefix, shared=shared, recurse=True
|
||||
)
|
||||
|
||||
@property
|
||||
def lapack_libs(self):
|
||||
return self.blas_libs
|
||||
|
||||
def install_test(self):
|
||||
source_file = join_path(os.path.dirname(self.module.__file__),
|
||||
'test_cblas_dgemm.c')
|
||||
@@ -146,7 +141,7 @@ def install_test(self):
|
||||
'test_cblas_dgemm.output')
|
||||
|
||||
include_flags = ["-I%s" % self.spec.prefix.include]
|
||||
link_flags = self.lapack_libs.ld_flags.split()
|
||||
link_flags = self.libs.ld_flags.split()
|
||||
|
||||
output = compile_c_and_execute(source_file, include_flags, link_flags)
|
||||
compare_output_file(output, blessed_file)
|
||||
|
Reference in New Issue
Block a user