summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/libristra/package.py
blob: 109d18c4e19f58aca7c5a0a0cc77f29cdc3bf291 (plain) (blame)
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
# Copyright 2013-2022 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)


from spack.package import *


class Libristra(CMakePackage):
    """ The ristra library is a set of support utilities for
    ristra codes, including simple mathematical operations, physical
    units, and input parsing
    """
    homepage = 'https://github.com/laristra/libristra'
    url = 'https://github.com/laristra/libristra/archive/master.zip'
    git = 'https://github.com/laristra/libristra.git'

    version('master', branch='master', submodules=False, preferred=True)
    version('1.0.0', commit='33235fe0334ca7f1f99b386a90932d9f8e1e71de')

    variant('build_type', default='Release', values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'),
            description='The build type to build', multi=False)
    variant('paraview', default=False, description='Enable ParaView')
    variant('shared_lua', default=False, description='Build with shared lua')

    depends_on('cmake@3.12:')
    depends_on('mpi')
    depends_on('boost@1.70.0: cxxstd=17 +program_options')
    depends_on('lua@5.3.5~shared', when='~shared_lua')
    depends_on('lua@5.3.5+shared', when='+shared_lua')
    # TODO: might want to move paraview out of libristra
    depends_on('paraview', when='+paraview')
    # We explicitly depend on gtest and can no longer rely on others for it
    depends_on('googletest@1.8.1+gmock')

    def cmake_args(self):
        options = ['-DENABLE_LUA=ON']

        options.append(self.define('ENABLE_UNIT_TESTS', self.run_tests))

        return options