-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmeta.yaml
72 lines (65 loc) · 2.57 KB
/
meta.yaml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{% set version = "2.1.0" %}
{% set build = 8 %}
package:
name: libastra
version: {{ version }}
source:
url: https://github.com/astra-toolbox/astra-toolbox/archive/refs/tags/v{{ version }}.tar.gz
sha256: 7768863a2756887e54829725e8fe95a371c7cb0cdfa5392b2e11cfc290f54dc3
patches:
- cmake.patch
- find-cuda.patch
build:
track_features:
- nocuda_la6JwwDGF7 # [cuda_compiler_version == "None"]
run_exports:
- {{ pin_subpackage('libastra', max_pin='x.x.x') }}
- libastra =*=cuda* # [cuda_compiler_version != "None"]
- libastra =*=h* # [cuda_compiler_version == "None"]
number: {{ build }}
string: "{{ "cuda" + cuda_compiler_version|string }}h{{ PKG_HASH }}_{{ build + 100 }}" # [cuda_compiler_version != "None"]
script_env:
- ASTRA_USE_CUDA=ON # [cuda_compiler_version != "None"]
- ASTRA_USE_CUDA=OFF # [cuda_compiler_version == "None"]
requirements:
build:
- {{ compiler('cuda') }} # [cuda_compiler_version != "None"]
- {{ compiler('cxx') }}
# CMake policy max must be set to 3.22 for CMake to not autodetect architectures
- cmake >=3.18
- ninja # [not win]
host:
- boost-cpp
- cudatoolkit # [cuda_compiler_version != "None"]
run:
- __cuda # [cuda_compiler_version != "None"]
# unix uses pthread, but win links to libboost:threads
- {{ pin_compatible('boost-cpp', max_pin='x.x') }} # [win]
test:
requires:
# libastra uses header-only from Boost, but the unit tests actually link to libboost_unit_test_framework.so
- {{ pin_compatible('boost-cpp', max_pin='x.x') }}
source_files:
- build/tests/astratest # [unix]
- build/tests/Release/astratest.exe # [win]
commands:
- test -f $PREFIX/lib/libastra${SHLIB_EXT} # [linux]
- test -f $PREFIX/lib/libastra${SHLIB_EXT}.0 # [linux]
- test -f $PREFIX/lib/libastra${SHLIB_EXT}.0.0.0 # [linux]
- "LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH ./build/tests/astratest" # [unix]
# Library named differently from upstream because it makes linking
# consistent between platforms. File links don't work on Windows.
- if not exist %LIBRARY_LIB%\\astra.lib exit 1 # [win]
- if not exist %LIBRARY_BIN%\\astra.dll exit 1 # [win]
- build\\tests\\Release\\astratest # [win]
about:
home: http://www.astra-toolbox.com
license: GPL-3.0-only
license_file:
- COPYING
- lib/licenses/rapidxml.txt
summary: 'libastra is a C++ library of high-performance GPU primitives for 2D
and 3D tomography.'
extra:
recipe-maintainers:
- carterbox