
- remove the old LGPL license headers from all files in Spack - add SPDX headers to all files - core and most packages are (Apache-2.0 OR MIT) - a very small number of remaining packages are LGPL-2.1-only
45 lines
1.4 KiB
Python
45 lines
1.4 KiB
Python
# 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 Minitri(MakefilePackage):
|
|
"""A simple, triangle-based data analytics proxy application."""
|
|
|
|
homepage = "https://github.com/Mantevo/miniTri"
|
|
url = "https://github.com/Mantevo/miniTri/archive/v1.0.tar.gz"
|
|
|
|
version('1.0', '947e296ca408275232f47724267a85ce')
|
|
|
|
variant('mpi', default=True, description='Build with MPI support')
|
|
|
|
depends_on('mpi', when="+mpi")
|
|
|
|
tags = ['proxy-app', 'ecp-proxy-app']
|
|
|
|
@property
|
|
def build_targets(self):
|
|
targets = []
|
|
if '+mpi' in self.spec:
|
|
targets.append('CCC={0}'.format(self.spec['mpi'].mpicxx))
|
|
targets.append('--directory=miniTri/linearAlgebra/MPI')
|
|
else:
|
|
targets.append('CCC={0}'.format(self.compiler.cxx))
|
|
targets.append('--directory=miniTri/linearAlgebra/serial')
|
|
|
|
targets.append('--file=Makefile')
|
|
return targets
|
|
|
|
def install(self, spec, prefix):
|
|
# Manual installation
|
|
mkdir(prefix.bin)
|
|
mkdir(prefix.doc)
|
|
|
|
if '+mpi' in spec:
|
|
install('miniTri/linearAlgebra/MPI/miniTri.exe', prefix.bin)
|
|
else:
|
|
install('miniTri/linearAlgebra/serial/miniTri.exe', prefix.bin)
|