Skip to content

Commit de4d64d

Browse files
committed
checking BUILD_PREFIX
1 parent 7ab27ca commit de4d64d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

conda-recipe/build.sh

+10-3
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,19 @@ if [ ! -d "${INSTALLED_DIR}/imex/lib" ]; then
3333
# grrrr
3434
# as long as the conda packages differ from system oneAPI installs we need to explicitly provide the include dir for SYCL
3535
# see also below in cmake call
36-
SYCL_INC_DIR=$(dirname $(dirname $(find ${CONDA_PREFIX} -d -name __spriv | head -n 1)))
37-
if [ ! -d "${SYCL_INC_DIR}" ]; then
36+
for root in "${CONDA_PREFIX}" "${BUILD_PREFIX}"; do
37+
spirvdir=$(find "${root}" -d -name __spriv | head -n 1)
38+
if [ -d "${spirvdir}" ]; then
39+
SYCL_INC_DIR=$(dirname $(dirname "${spirvdir}"))
40+
break
41+
fi
42+
done
43+
if [ -d "${SYCL_INC_DIR}" ]; then
44+
echo "Using SYCL_INC_DIR=${SYCL_INC_DIR}"
45+
else
3846
echo "Fatal error: SYCL_INC_DIR not found"
3947
exit 1
4048
fi
41-
echo "Using SYCL_INC_DIR=${SYCL_INC_DIR}"
4249

4350
rm -rf ${INSTALLED_DIR}/imex
4451
IMEX_SHA=$(cat imex_version.txt)

0 commit comments

Comments
 (0)