spack/var/spack/repos/builtin/packages/ginkgo/package.py
tcojean 68c4849f77 Ginkgo package: update to release 1.0.0 (#11312)
* Version 1.0.0 was released and the master branch tracks the
  latest release.
* Multiple issues with MacOS have been fixed. The static patch is
  now unneeded.
* Add support for building Ginkgo with the full Block Jacobi
  performance (compilation takes a long time).
* Do not build anything which is not useful for the installation.
  Namely, documentation, benchmarks, examples and tests.
2019-05-02 08:25:39 +09:00

47 lines
1.9 KiB
Python

# Copyright 2013-2019 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 *
import sys
class Ginkgo(CMakePackage, CudaPackage):
"""High-performance linear algebra library for manycore systems,
with a focus on sparse solution of linear systems."""
homepage = "https://ginkgo-project.github.io/"
url = "https://github.com/ginkgo-project/ginkgo.git"
git = "https://github.com/ginkgo-project/ginkgo.git"
version('develop', branch='develop')
version('master', branch='master')
version('1.0.0', branch='v1.0.0')
variant('shared', default=True, description='Build shared libraries')
variant('full_optimizations', default=False, description='Compile with all optimizations')
variant('openmp', default=sys.platform != 'darwin', description='Build with OpenMP')
variant('build_type', default='Release',
description='The build type to build',
values=('Debug', 'Release'))
depends_on('cmake@3.9:', type='build')
depends_on('cuda@9:', when='+cuda')
def cmake_args(self):
spec = self.spec
return [
'-DGINKGO_BUILD_CUDA=%s' % ('ON' if '+cuda' in spec else 'OFF'),
'-DGINKGO_BUILD_OMP=%s' % ('ON' if '+openmp' in spec else 'OFF'),
'-DBUILD_SHARED_LIBS=%s' % ('ON' if '+shared' in spec else 'OFF'),
'-DGINKGO_JACOBI_FULL_OPTIMIZATIONS=%s' % (
'ON' if '+full_optimizations' in spec else 'OFF'),
# As we are not exposing benchmarks, examples, tests nor doc
# as part of the installation, disable building them altogether.
'-DGINKGO_BUILD_BENCHMARKS=OFF',
'-DGINKGO_BUILD_DOC=OFF',
'-DGINKGO_BUILD_EXAMPLES=OFF',
'-DGINKGO_BUILD_TESTS=OFF'
]