summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/h5cpp/package.py
blob: 208701781bb1e0a8898dfc476b2703ddc73ada23 (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
# 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 H5cpp(CMakePackage):
    """Easy to use HDF5 C++ templates for Serial and Parallel HDF5"""

    homepage = "http://h5cpp.org"
    url      = "https://github.com/steven-varga/h5cpp/archive/v1.10.4-5.tar.gz"
    git      = "https://github.com/steven-varga/h5cpp.git"

    maintainers = ['eschnett']

    version('master', branch='master')
    version('1.10.4-6', sha256='4fbc8e777dc78a37ec2fe8c7b6a47114080ffe587f083e83a2046b5e794aef93')
    version('1.10.4-5', sha256='661ccc4d76e081afc73df71ef11d027837d92dd1089185f3650afcaec9d418ec')

    variant('mpi', default=True, description='Include MPI support')

    depends_on('cmake @3.10:', type='build')
    depends_on('hdf5 @1.10.4:')
    depends_on('hdf5 +mpi', when='+mpi')
    depends_on('mpi', when='+mpi')

    def cmake_args(self):
        return [
            '-DHDF5_INCLUDE_DIRS=%s' %
            self.spec['hdf5'].headers.directories[0],
            '-DHDF5_LIBRARIES=%s' % self.spec['hdf5'].libs.directories[0],
            '-DH5CPP_BUILD_TESTS=OFF',
        ]