summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/flecsale/package.py
blob: 803624acd05c6421269ee4423cbce9bf3cef6118 (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
# Copyright 2013-2018 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 import *


class Flecsale(CMakePackage):
    """Flecsale is an ALE code based on FleCSI"""

    homepage = "https://github.com/laristra/flecsale"
    git      = "https://github.com/laristra/flecsale.git"

    version('develop', branch='master', submodules=True)

    variant('mpi', default=True,
            description='Build on top of mpi conduit for mpi inoperability')

    depends_on("cmake@3.1:", type='build')
    depends_on("flecsi~mpi", when='~mpi')
    depends_on("flecsi+mpi", when='+mpi')
    depends_on("python")
    depends_on("openssl")

    def cmake_args(self):
        options = [
            '-DENABLE_UNIT_TESTS=ON'
            '-DENABLE_OPENSSL=ON'
            '-DENABLE_PYTHON=ON'
        ]

        if '+mpi' in self.spec:
            options.extend([
                '-DENABLE_MPI=ON',
                '-DFLECSI_RUNTIME_MODEL=mpilegion'
            ])

        return options