
Example replacement: ``` '-D(\w+)(:BOOL)?=\{0\}'\.\s*format\s*\(\s*'(ON|YES|true|TRUE)' if '\+(\w+)' in (self\.)?spec else '(OFF|NO|false|FALSE)'\) ``` with ``` self.define_from_variant('\1', '\4') ``` This will cause failures if any variants were misspelled: I have already caught two packages with nonexistent variants.
29 lines
971 B
Python
29 lines
971 B
Python
# Copyright 2013-2021 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 Flcl(CMakePackage):
|
|
"""API for Fortran to C++ and C++ to Fortran multi-dimensional array
|
|
interoperability using Kokkos."""
|
|
|
|
homepage = "https://github.com/kokkos/kokkos-fortran-interop"
|
|
git = "https://github.com/kokkos/kokkos-fortran-interop.git"
|
|
url = "https://github.com/kokkos/kokkos-fortran-interop/releases/download/0.3/0.3.tar.gz"
|
|
|
|
maintainers = ['womeld', 'agaspar']
|
|
|
|
version('develop', branch='develop')
|
|
version('0.3', sha256='0586b981b976588d8059e5bf1bf71fb5a7153ea950c7e2b562a3d812fefee56e')
|
|
|
|
depends_on('kokkos')
|
|
depends_on('cmake@3.17:', type='build')
|
|
|
|
def cmake_args(self):
|
|
args = []
|
|
args.append(self.define('BUILD_TESTING', self.run_tests))
|
|
|
|
return args
|