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
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# 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 Pthreadpool(CMakePackage):
"""pthreadpool is a portable and efficient thread pool implementation."""
homepage = "https://github.com/Maratyszcza/pthreadpool"
git = "https://github.com/Maratyszcza/pthreadpool.git"
version('master', branch='master')
depends_on('cmake@3.5:', type='build')
depends_on('ninja', type='build')
depends_on('python', type='build')
generator = 'Ninja'
resource(
name='fxdiv',
git='https://github.com/Maratyszcza/FXdiv.git',
branch='master',
destination='deps',
placement='fxdiv',
)
resource(
name='googletest',
url='https://github.com/google/googletest/archive/release-1.10.0.zip',
sha256='94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91',
destination='deps',
placement='googletest',
)
resource(
name='googlebenchark',
url='https://github.com/google/benchmark/archive/v1.5.3.zip',
sha256='bdefa4b03c32d1a27bd50e37ca466d8127c1688d834800c38f3c587a396188ee',
destination='deps',
placement='googlebenchmark',
)
def cmake_args(self):
return [
self.define('FXDIV_SOURCE_DIR',
join_path(self.stage.source_path, 'deps', 'fxdiv')),
self.define('GOOGLETEST_SOURCE_DIR',
join_path(self.stage.source_path, 'deps', 'googletest')),
self.define('GOOGLEBENCHMARK_SOURCE_DIR',
join_path(self.stage.source_path, 'deps', 'googlebenchmark')),
]
|