-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage.py
91 lines (74 loc) · 3.64 KB
/
package.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack. We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
# them, you can save this file and test your package like this:
#
# spack install gmds
#
# You can edit this file again by typing:
#
# spack edit gmds
#
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------
from spack import *
class Gmds(CMakePackage):
"""GMDS: Generic Mesh Data and Services."""
homepage = "https://github.com/LIHPC-Computational-Geometry/gmds"
url = "https://github.com/LIHPC-Computational-Geometry/gmds/archive/refs/tags/0.0.0.tar.gz"
git = "https://github.com/LIHPC-Computational-Geometry/gmds.git"
version('main', branch='main')
version('1.3.8', sha256='4856ea2dac23f19e7b5cbe16c64cbc8083e3a2da14bcb12644f33bef28faa76a')
version('1.3.7', sha256='102a1370257a22c7a864629507113fecb91c68f63eafb12f95dd7fd44a2f992a')
version('1.3.5', sha256='9391e4f6858080fe38538fa7ad3650a1237a1db5fd4c165de6b1f62c1e0a1a74')
version('1.3.4', sha256='1d8c28e948eb26d20cac63e1884d4bac032ee74f1a5dfa70b532e847f48b9bb0')
version('1.3.3', sha256='a8387dfb4e023877a271dd862aa2a6ec301623daccc4aef1455861368e90daea')
version('1.3.2', sha256='cd6efea3815f0bf62951caa065e568405d938370547152a892ef28c921a99cc9')
version('1.3.1', sha256='59e5f993b8a650d67c3d317c27151cb784084f841606934ebc235cb4c886b215')
version('1.3.0', sha256='a21ae0d8941e91c37d7a255cb3b639823d33a0111f1a0a321adec58a027d7723')
version('1.2.1')
version('1.1.0')
version('1.0.0')
variant('kmds', default=False, description='Build with Kokkos')
variant('elg3d', default=False, description='Build Elg3D')
variant('blocking', default=False, description='Build the blocking component')
variant('lima', default=False, description='Provide Lima IO')
variant('python', default=False, description='Provide GMDS Python API')
variant('cgns', default=False, description='Provide CGNS blocking export')
depends_on('glpk')
# necessary to build the internal glpk
depends_on('libtool', type='build')
depends_on('eigen')
depends_on('kokkos', when='+kmds')
# necessary to find gts
depends_on('pkgconfig', type=('build'))
depends_on('pcre2')
depends_on('glib')
depends_on('gts')
depends_on('exodusii', when='+elg3d')
depends_on('cgns', when='+cgns')
conflicts('+elg3d', when='~kmds', msg='elg3d cannot be built without kmds.')
depends_on('cgal', when='+blocking')
depends_on('py-pybind11', when='+python')
depends_on('lima+mli2', when='+lima')
# testing dependencies
depends_on('lcov')
depends_on('googletest')
depends_on('py-pytest', when='+python')
depends_on('nlohmann-json')
def cmake_args(self):
args = []
args.append(self.define_from_variant('ENABLE_KMDS', 'kmds'))
args.append(self.define_from_variant('ENABLE_ELG3D', 'elg3d'))
args.append(self.define_from_variant('ENABLE_BLOCKING', 'blocking'))
args.append(self.define_from_variant('WITH_PYTHON_API', 'python'))
args.append(self.define_from_variant('WITH_LIMA', 'lima'))
args.append(self.define_from_variant('WITH_CGNS', 'cgns'))
return args