package.py 3.46 KB
Newer Older
Matthieu Dorier's avatar
Matthieu Dorier committed
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
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *


class Hepnos(CMakePackage):
    """Object store for High Energy Physics, build around Mochi components"""

31
    homepage = "https://github.com/hepnos/HEPnOS"
32
    url = "https://github.com/hepnos/HEPnOS/archive/v0.4.2.tar.gz"
33
    git = "https://github.com/hepnos/HEPnOS.git"
Matthieu Dorier's avatar
Matthieu Dorier committed
34

Matthieu Dorier's avatar
Matthieu Dorier committed
35
    version('0.4.2', tag='v0.4.2')
36
    version('0.4.1', tag='v0.4.1')
Matthieu Dorier's avatar
Matthieu Dorier committed
37
    version('0.4.0', tag='v0.4.0')
38
    version('0.3.2', tag='v0.3.2')
39
    version('0.3.1', tag='v0.3.1')
Matthieu Dorier's avatar
Matthieu Dorier committed
40
    version('0.3.0', tag='v0.3.0')
41
    version('0.2.0', tag='v0.2.0')
Matthieu Dorier's avatar
Matthieu Dorier committed
42 43
    version('0.1.8', tag='v0.1.8')
    version('0.1.7', tag='v0.1.7')
44
    version('0.1.6', tag='v0.1.6')
Matthieu Dorier's avatar
Matthieu Dorier committed
45
    version('0.1.5', tag='v0.1.5')
Matthieu Dorier's avatar
Matthieu Dorier committed
46
    version('0.1.4', tag='v0.1.4')
Matthieu Dorier's avatar
Matthieu Dorier committed
47 48 49 50
    version('0.1.3', tag='v0.1.3')
    version('0.1.2', tag='v0.1.2')
    version('0.1.1', tag='v0.1.1')
    version('0.1',   tag='v0.1')
51
    version('develop', branch='main')
52
    version('main', branch='main')
Matthieu Dorier's avatar
Matthieu Dorier committed
53

54 55 56 57 58 59
    variant('cxxstd',
            default='14',
            values=('14', '17'),
            multi=False,
            description='Use the specified C++ standard when building.')

Matthieu Dorier's avatar
Matthieu Dorier committed
60 61 62
    depends_on('mpi')
    depends_on('yaml-cpp@develop')
    depends_on('boost+serialization')
63
    depends_on('cmake@3.12.0:')
64 65 66 67 68
    depends_on('libuuid', when='@0.2.0:')
    # Mochi dependencies for non-develop versions
    depends_on('mochi-ch-placement@0.1:')
    depends_on('mochi-thallium@0.5.2:', when='@0.2.0:')
    depends_on('mochi-margo@0.5.2:', when='@0.1.8') # past 0.1.8, HEPnOS requires thallium
69
    depends_on('mochi-sdskv@0.1.10:', when='@0.3.1:')
Philip Carns's avatar
Philip Carns committed
70 71 72
    depends_on('mochi-sdskv@0.1.8:', when='@0.2.0:')
    depends_on('mochi-sdskv@0.1.7:', when='@0.1.8:')
    depends_on('mochi-sdskv@0.1:')
73 74 75 76
    depends_on('mochi-bake@0.1:0.3.6', when='@:0.1.7') # after 0.1.7, HEPnOS does not require bake
    # Mochi dependencies for develop version
    depends_on('mochi-ch-placement@develop', when='@develop')
    depends_on('mochi-thallium@develop', when='@develop')
Philip Carns's avatar
Philip Carns committed
77
    depends_on('mochi-sdskv@develop', when='@develop')
Matthieu Dorier's avatar
Matthieu Dorier committed
78 79

    def cmake_args(self):
80
        extra_args = ['-DBUILD_SHARED_LIBS=ON']
Matthieu Dorier's avatar
Matthieu Dorier committed
81
        extra_args.extend(['-DCMAKE_CXX_COMPILER=%s' % self.spec['mpi'].mpicxx])
82
        extra_args.extend(['-DCMAKE_CXX_STANDARD=%s' % self.spec.variants['cxxstd'].value])
Matthieu Dorier's avatar
Matthieu Dorier committed
83
        return extra_args