summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGreg Sjaardema <gsjaardema@gmail.com>2019-09-08 16:14:56 -0600
committerAdam J. Stewart <ajstewart426@gmail.com>2019-09-08 17:14:56 -0500
commitdb1fb168406abb26f2f5a2d2d19cbc1089a54a9f (patch)
tree3f45a77882f14bbd206fa588be25b2720291fd95 /var
parent983e6b4a4a7d7cce4bf54ef01f374d055871eaad (diff)
downloadspack-db1fb168406abb26f2f5a2d2d19cbc1089a54a9f.tar.gz
spack-db1fb168406abb26f2f5a2d2d19cbc1089a54a9f.tar.bz2
spack-db1fb168406abb26f2f5a2d2d19cbc1089a54a9f.tar.xz
spack-db1fb168406abb26f2f5a2d2d19cbc1089a54a9f.zip
CGNS: Add setting of RPATH on Darwin (#9984)
* CGNS: Add setting of RPATH on Darwin This should go in the CGNS CMakeLists.txt, but it isn't there yet and won't be in previous versions, so best to handle it here. If building on darwin/MacOSX, need to set the RPATH so applications can find shared library correctly. * Restrict MACOSX_RPATH setting This has now been added to the CGNS distribution, so the setting of `CMAKE_MACOSX_RPATH` should be restricted to current and previous releases and not upcoming releases.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cgns/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py
index b0c2d8c6f5..9836d5fa44 100644
--- a/var/spack/repos/builtin/packages/cgns/package.py
+++ b/var/spack/repos/builtin/packages/cgns/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
from spack import *
@@ -72,4 +73,10 @@ class Cgns(CMakePackage):
else:
options.extend(['-DCGNS_ENABLE_HDF5=OFF'])
+ if self.version <= Version('3.3.1'):
+ if sys.platform == 'darwin':
+ options.extend([
+ '-DCMAKE_MACOSX_RPATH:BOOL=ON'
+ ])
+
return options