Reworking of lapack_shared_libs and similar properties (#1682)

* Turned <provider>_libs into an iterable

Modifications :
- added class LibraryList + unit tests
- added convenience functions `find_libraries` and `dedupe`
- modifed non Intel blas/lapack providers
- modified packages using blas_shared_libs and similar functions

* atlas : added pthread variant

* intel packages : added lapack_libs and blas_libs

* find_library_path : removed unused function

* PR review : fixed last issues

* LibraryList : added test on __add__ return type

* LibraryList : added __radd__ fixed unit tests

fix : failing unit tests due to missing `self`

* cp2k and dependecies : fixed blas-lapack related statements in package.py
This commit is contained in:
Massimiliano Culpo
2016-09-21 21:27:59 +02:00
committed by Todd Gamblin
parent 6b6f868f2a
commit d848559f70
33 changed files with 526 additions and 244 deletions

View File

@@ -46,18 +46,20 @@ class Armadillo(Package):
depends_on('hdf5', when='+hdf5')
def install(self, spec, prefix):
arpack = find_libraries(['libarpack'], root=spec[
'arpack-ng'].prefix.lib, shared=True)
superlu = find_libraries(['libsuperlu'], root=spec[
'superlu'].prefix, shared=False, recurse=True)
cmake_args = [
# ARPACK support
'-DARPACK_LIBRARY={0}/libarpack.{1}'.format(
spec['arpack-ng'].prefix.lib, dso_suffix),
'-DARPACK_LIBRARY={0}'.format(arpack.joined()),
# BLAS support
'-DBLAS_LIBRARY={0}'.format(spec['blas'].blas_shared_lib),
'-DBLAS_LIBRARY={0}'.format(spec['blas'].blas_libs.joined()),
# LAPACK support
'-DLAPACK_LIBRARY={0}'.format(spec['lapack'].lapack_shared_lib),
'-DLAPACK_LIBRARY={0}'.format(spec['lapack'].lapack_libs.joined()),
# SuperLU support
'-DSuperLU_INCLUDE_DIR={0}'.format(spec['superlu'].prefix.include),
'-DSuperLU_LIBRARY={0}/libsuperlu.a'.format(
spec['superlu'].prefix.lib64),
'-DSuperLU_LIBRARY={0}'.format(superlu.joined()),
# HDF5 support
'-DDETECT_HDF5={0}'.format('ON' if '+hdf5' in spec else 'OFF')
]