summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Kordenbrock <tkordenbrock@users.noreply.github.com>2021-10-13 11:39:11 -0500
committerGitHub <noreply@github.com>2021-10-13 12:39:11 -0400
commit6125117b5db0e1f8f3c437e84fc2237e3e8637de (patch)
tree4f5b6603c50b89af014ca33bea397b6006c553bc
parent37278c9fa0eb814459d834b3d4b5996eaf325801 (diff)
downloadspack-6125117b5db0e1f8f3c437e84fc2237e3e8637de.tar.gz
spack-6125117b5db0e1f8f3c437e84fc2237e3e8637de.tar.bz2
spack-6125117b5db0e1f8f3c437e84fc2237e3e8637de.tar.xz
spack-6125117b5db0e1f8f3c437e84fc2237e3e8637de.zip
SEACAS: add a Faodel variant (#26583)
* SEACAS: add a Faodel variant * Use safer CMake and variant packages instead of directly adding parameters Add a "+faodel ~mpi" dependency to balance "+faodel +mpi"
-rw-r--r--var/spack/repos/builtin/packages/seacas/package.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/seacas/package.py b/var/spack/repos/builtin/packages/seacas/package.py
index 4a6acc7cec..bc2c4d1592 100644
--- a/var/spack/repos/builtin/packages/seacas/package.py
+++ b/var/spack/repos/builtin/packages/seacas/package.py
@@ -68,10 +68,12 @@ class Seacas(CMakePackage):
description='Enable thread-safe exodus and IOSS libraries')
# TPLs (alphabet order)
- variant('adios2', default=False,
+ variant('adios2', default=False,
description='Enable ADIOS2')
variant('cgns', default=True,
description='Enable CGNS')
+ variant('faodel', default=False,
+ description='Enable Faodel')
variant('matio', default=True,
description='Compile with matio (MatLab) support')
variant('metis', default=False,
@@ -95,6 +97,11 @@ class Seacas(CMakePackage):
depends_on('metis+int64+real64')
depends_on('parmetis+int64', when='+mpi')
+ # The Faodel TPL is only supported in seacas@2021-04-05:
+ depends_on('faodel@1.2108.1:+mpi', when='+faodel +mpi')
+ depends_on('faodel@1.2108.1:~mpi', when='+faodel ~mpi')
+ conflicts('+faodel', when='@:2021-01-20', msg='The Faodel TPL is only compatible with @2021-04-05 and later.')
+
# MPI related dependencies
depends_on('mpi', when='+mpi')
@@ -250,6 +257,14 @@ class Seacas(CMakePackage):
'-DTPL_ENABLE_CGNS:BOOL=OFF'
])
+ define = CMakePackage.define
+ from_variant = self.define_from_variant
+ options.append(from_variant('TPL_ENABLE_Faodel', 'faodel'))
+
+ for pkg in ('Faodel', 'BOOST'):
+ if pkg.lower() in spec:
+ options.append(define(pkg + '_ROOT', spec[pkg.lower()].prefix))
+
if '+adios2' in spec:
options.extend([
'-DTPL_ENABLE_ADIOS2:BOOL=ON',