Merge pull request #1236 from davydden/pkg/arpack-ng_blas
arpack-ng: fix blas/lapack libraries
This commit is contained in:
		| @@ -86,10 +86,19 @@ def install(self, spec, prefix): | |||||||
|         options.extend(std_cmake_args) |         options.extend(std_cmake_args) | ||||||
|         options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) |         options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) | ||||||
|  |  | ||||||
|         # TODO: |         # Make sure we use Spack's blas/lapack: | ||||||
|         # Arpack calls directly find_package(BLAS REQUIRED) and |         options.extend([ | ||||||
|         # find_package(LAPACK REQUIRED). Make sure correct Blas/Lapack are |             '-DLAPACK_FOUND=true', | ||||||
|         # picked up. |             '-DLAPACK_INCLUDE_DIRS=%s' % spec['lapack'].prefix.include, | ||||||
|  |             '-DLAPACK_LIBRARIES=%s' % ( | ||||||
|  |                 spec['lapack'].lapack_shared_lib if '+shared' in spec else | ||||||
|  |                 spec['lapack'].lapack_static_lib), | ||||||
|  |             '-DBLAS_FOUND=true', | ||||||
|  |             '-DBLAS_INCLUDE_DIRS=%s' % spec['blas'].prefix.include, | ||||||
|  |             '-DBLAS_LIBRARIES=%s' % ( | ||||||
|  |                 spec['blas'].blas_shared_lib if '+shared' in spec else | ||||||
|  |                 spec['blas'].blas_static_lib) | ||||||
|  |         ]) | ||||||
|  |  | ||||||
|         if '+mpi' in spec: |         if '+mpi' in spec: | ||||||
|             options.append('-DMPI=ON') |             options.append('-DMPI=ON') | ||||||
| @@ -101,9 +110,8 @@ def install(self, spec, prefix): | |||||||
|  |  | ||||||
|         cmake('.', *options) |         cmake('.', *options) | ||||||
|         make() |         make() | ||||||
|         # TODO: make test does not work |         if self.run_tests: | ||||||
|         # make('test') |             make('test') | ||||||
|  |  | ||||||
|         make('install') |         make('install') | ||||||
|  |  | ||||||
|     @when('@3.3.0') |     @when('@3.3.0') | ||||||
| @@ -120,10 +128,23 @@ def install(self, spec, prefix): | |||||||
|                 'F77=%s' % spec['mpi'].mpif77 |                 'F77=%s' % spec['mpi'].mpif77 | ||||||
|             ]) |             ]) | ||||||
|  |  | ||||||
|         if '~shared' in spec: |         if '+shared' in spec: | ||||||
|             options.append('--enable-shared=no') |             options.extend([ | ||||||
|  |                 '--with-blas=%s' % to_link_flags( | ||||||
|  |                     spec['blas'].blas_shared_lib), | ||||||
|  |                 '--with-lapack=%s' % to_link_flags( | ||||||
|  |                     spec['lapack'].lapack_shared_lib) | ||||||
|  |             ]) | ||||||
|  |         else: | ||||||
|  |             options.extend([ | ||||||
|  |                 '--with-blas=%s' % spec['blas'].blas_static_lib, | ||||||
|  |                 '--with-lapack=%s' % spec['lapack'].lapack_static_lib, | ||||||
|  |                 '--enable-shared=no' | ||||||
|  |             ]) | ||||||
|  |  | ||||||
|         bootstrap() |         bootstrap() | ||||||
|         configure(*options) |         configure(*options) | ||||||
|         make() |         make() | ||||||
|  |         if self.run_tests: | ||||||
|  |             make('check') | ||||||
|         make('install') |         make('install') | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 becker33
					becker33