File: upstream-testsuite

package info (click to toggle)
libthrust 1.17.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,900 kB
  • sloc: ansic: 29,519; cpp: 23,989; python: 1,421; sh: 811; perl: 460; makefile: 112
file content (73 lines) | stat: -rwxr-xr-x 1,361 bytes parent folder | download
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
73
#!/bin/sh
set -e

host=
device=${1:-CPP}

CPP=ON
CUDA=OFF
TBB=ON
OMP=ON
case $device in
	CUDA)
		CUDA=ON
		;;
	*/CUDA)
		host=${device%/CUDA}
		device=CUDA
		CPP=OFF
		CUDA=ON
		TBB=OFF
		OMP=OFF
		eval ${host}=ON
		;;
esac

CPP14=OFF
CPP17=OFF
eval CPP${2:-17}=ON

CXX="${3:-g++}"

p=" ${DEB_BUILD_OPTIONS} "
p=${p##* parallel=}
p=${p%% *}
p=${p:-$(nproc)}

if [ "$CXX" != "cuda-g++" ]; then
	if [ "$(readlink -f /usr/bin/$CXX)" = "$(readlink -f /usr/bin/cuda-g++)" ]; then
		# do not rerun the cuda-g++ test
		exit 77
	fi
fi

AUTOPKGTEST_TMP=${AUTOPKGTEST_TMP:-$(mktemp -d)}

set -x

cmake \
	-S . \
	-B $AUTOPKGTEST_TMP \
	${3:+-DCMAKE_CXX_COMPILER=$3} \
	-DTHRUST_ENABLE_MULTICONFIG=ON \
	-DTHRUST_MULTICONFIG_ENABLE_DIALECT_CPP11=OFF \
	-DTHRUST_MULTICONFIG_ENABLE_DIALECT_CPP14=$CPP14 \
	-DTHRUST_MULTICONFIG_ENABLE_DIALECT_CPP17=$CPP17 \
	-DTHRUST_MULTICONFIG_ENABLE_SYSTEM_CPP=$CPP \
	-DTHRUST_MULTICONFIG_ENABLE_SYSTEM_CUDA=$CUDA \
	-DTHRUST_MULTICONFIG_ENABLE_SYSTEM_TBB=$TBB \
	-DTHRUST_MULTICONFIG_ENABLE_SYSTEM_OMP=$OMP \
	-DTHRUST_MULTICONFIG_WORKLOAD=LARGE \
	${host:+-DTHRUST_HOST_SYSTEM_OPTIONS=$host} \
	-DTHRUST_DEVICE_SYSTEM_OPTIONS=$device \
	-D_THRUST_CMAKE_DIR=/usr/share/cmake/thrust \
	-DTHRUST_INSTALL_CUB_HEADERS=OFF \
	-Wno-dev

cd $AUTOPKGTEST_TMP

make ${p:+-j $p}

test "$device" = "CUDA" || ctest --output-on-failure

make clean