diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/oce/package.py | 6 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/trilinos/package.py | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py index 36b58269f1..950621da40 100644 --- a/var/spack/repos/builtin/packages/oce/package.py +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -87,7 +87,11 @@ class Oce(Package): '-DOCE_OSX_USE_COCOA:BOOL=ON', ]) - options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) + if '.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12': + # use @rpath on Sierra due to limit of dynamic loader + options.append('-DCMAKE_MACOSX_RPATH=ON') + else: + options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) cmake('.', *options) make("install/strip") diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index aed722814b..5f8c2debb0 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -25,6 +25,7 @@ from spack import * import os import sys +import platform # Trilinos is complicated to build, as an inspiration a couple of links to # other repositories which build it: @@ -171,10 +172,15 @@ class Trilinos(CMakePackage): '-DLAPACK_LIBRARY_DIRS=%s' % ';'.join(lapack.directories), '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', - '-DTPL_ENABLE_Netcdf:BOOL=ON', - '-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % self.prefix + '-DTPL_ENABLE_Netcdf:BOOL=ON' ]) + if '.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12': + # use @rpath on Sierra due to limit of dynamic loader + options.append('-DCMAKE_MACOSX_RPATH=ON') + else: + options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) + # Force Trilinos to use the MPI wrappers instead of raw compilers # this is needed on Apple systems that require full resolution of # all symbols when linking shared libraries |