ispc: external find support, added master branch version (#20033)

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
Martin Aumüller 2020-11-23 12:28:11 +01:00 committed by GitHub
parent 8a54817d4e
commit b62401ec8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,7 @@
from spack import *
import re
class Ispc(CMakePackage):
@ -18,8 +19,12 @@ class Ispc(CMakePackage):
homepage = "https://ispc.github.io"
url = "https://github.com/ispc/ispc/tarball/v1.14.1"
git = "https://github.com/ispc/ispc"
maintainers = ['aumuell']
executables = ['^ispc$']
version('master', branch='master')
version('1.14.1', sha256='ca12f26dafbc4ef9605487d03a2156331c1351a4ffefc9bab4d896a466880794')
version('1.14.0', sha256='1ed72542f56738c632bb02fb0dd56ad8aec3e2487839ebbc0def8334f305a4c7')
version('1.13.0', sha256='aca595508b51dd1ff065c406a3fd7c93822320c510077dd4d97a2b98a23f097a')
@ -34,6 +39,7 @@ class Ispc(CMakePackage):
depends_on('llvm@10:10.999', when='@1.13:1.13.999')
patch('don-t-assume-that-ncurses-zlib-are-system-libraries.patch',
when='@1.14:1.14.999',
sha256='d3ccf547d3ba59779fd375e10417a436318f2200d160febb9f830a26f0daefdc')
patch('fix-linking-against-llvm-10.patch', when='@1.13:1.13.999',
@ -47,3 +53,10 @@ def cmake_args(self):
args.append('-DISPC_INCLUDE_TESTS=OFF')
args.append('-DISPC_INCLUDE_UTILS=OFF')
return args
@classmethod
def determine_version(cls, exe):
output = Executable(exe)('--version', output=str, error=str)
match = re.search(r'^Intel.*[iI][sS][pP][cC]\),\s+(\S+)\s+\(build.*\)',
output)
return match.group(1) if match else None