Skip to content

Commit

Permalink
dealii: add GMSH, add CMAKE_FIND_APPBUNDLE to CMakePackage (spack#6723)
Browse files Browse the repository at this point in the history
* dealii: add GMSH dependency

* CMakePackage: add CMAKE_FIND_APPBUNDLE to prevent picking up binaries from /Applications
  • Loading branch information
davydden authored and alalazo committed Dec 19, 2017
1 parent e8de22c commit 548c225
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/spack/spack/build_systems/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ def _std_args(pkg):
]

if platform.mac_ver()[0]:
args.append('-DCMAKE_FIND_FRAMEWORK:STRING=LAST')
args.extend([
'-DCMAKE_FIND_FRAMEWORK:STRING=LAST',
'-DCMAKE_FIND_APPBUNDLE:STRING=LAST'
])

# Set up CMake rpath
args.append('-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE')
Expand Down
5 changes: 4 additions & 1 deletion var/spack/repos/builtin/packages/dealii/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Dealii(CMakePackage, CudaPackage):
description='Compile with Adol-c')
variant('doc', default=False,
description='Compile with documentation')
variant('gmsh', default=False, description='Compile with GMSH')
variant('gsl', default=True, description='Compile with GSL')
variant('hdf5', default=True,
description='Compile with HDF5 (only with MPI)')
Expand Down Expand Up @@ -120,6 +121,7 @@ class Dealii(CMakePackage, CudaPackage):
depends_on('assimp', when='@9.0:+assimp')
depends_on('doxygen+graphviz', when='+doc')
depends_on('graphviz', when='+doc')
depends_on('gmsh', when='@9.0:+gmsh', type=('build', 'run'))
depends_on('gsl', when='@8.5.0:+gsl')
depends_on('hdf5+mpi+hl', when='+hdf5+mpi')
depends_on('cuda@8:', when='+cuda')
Expand Down Expand Up @@ -150,6 +152,7 @@ class Dealii(CMakePackage, CudaPackage):

# check that the combination of variants makes sense
conflicts('+assimp', when='@:8.5.1')
conflicts('+gmsh', when='@:8.5.1')
conflicts('+nanoflann', when='@:8.5.1')
conflicts('+scalapack', when='@:8.5.1')
conflicts('+sundials', when='@:8.5.1')
Expand Down Expand Up @@ -266,7 +269,7 @@ def cmake_args(self):
# variables:
for library in (
'gsl', 'hdf5', 'p4est', 'petsc', 'slepc', 'trilinos', 'metis',
'sundials', 'nanoflann', 'assimp'):
'sundials', 'nanoflann', 'assimp', 'gmsh'):
if library in spec:
options.extend([
'-D%s_DIR=%s' % (library.upper(), spec[library].prefix),
Expand Down

0 comments on commit 548c225

Please sign in to comment.