summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-20 03:37:10 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-20 03:37:10 -0700
commit6251c97cd5011f71f31587fff6648885fe3dfb2b (patch)
treeca932e0352700d2c40177d8d731567264a045418
parentd02d72e06d4e67745ff8a0866c758e64f74828a3 (diff)
parent95ad2875b6bb4dc15eb43b44c1dbdd521c843119 (diff)
downloadspack-6251c97cd5011f71f31587fff6648885fe3dfb2b.tar.gz
spack-6251c97cd5011f71f31587fff6648885fe3dfb2b.tar.bz2
spack-6251c97cd5011f71f31587fff6648885fe3dfb2b.tar.xz
spack-6251c97cd5011f71f31587fff6648885fe3dfb2b.zip
Merge pull request #584 from davydden/scalapack_osx
fix library scalapack suffix for osx
-rw-r--r--var/spack/repos/builtin/packages/netlib-scalapack/package.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
index 22d538560e..a5b6eedafb 100644
--- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
@@ -1,8 +1,9 @@
from spack import *
+import sys
class NetlibScalapack(Package):
"""ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines"""
-
+
homepage = "http://www.netlib.org/scalapack/"
url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz"
@@ -32,17 +33,17 @@ class NetlibScalapack(Package):
"-DCMAKE_C_FLAGS=-fPIC",
"-DCMAKE_Fortran_FLAGS=-fPIC"
])
-
+
options.extend(std_cmake_args)
-
+
with working_dir('spack-build', create=True):
cmake('..', *options)
make()
make("install")
def setup_dependent_environment(self, module, spec, dependent_spec):
- # TODO treat OS that are not Linux...
- lib_suffix = '.so' if '+shared' in spec['scalapack'] else '.a'
+ lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
+ lib_suffix = lib_dsuffix if '+shared' in spec['scalapack'] else '.a'
spec['scalapack'].fc_link = '-L%s -lscalapack' % spec['scalapack'].prefix.lib
spec['scalapack'].cc_link = spec['scalapack'].fc_link