-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathbuild_for_develop.sh
More file actions
executable file
·46 lines (37 loc) · 1.34 KB
/
Copy pathbuild_for_develop.sh
File metadata and controls
executable file
·46 lines (37 loc) · 1.34 KB
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
#!/bin/bash
set +xe
rm -rf build_cmake
mkdir build_cmake
pushd build_cmake
INSTALL_PREFIX=`pwd`/../install
rm -rf ${INSTALL_PREFIX}
export ONEAPI_ROOT=/opt/intel/oneapi
DPCPP_ROOT=${ONEAPI_ROOT}/compiler/latest/linux
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} \
-DDPCPP_ROOT=${DPCPP_ROOT} \
-DCMAKE_C_COMPILER:PATH=${DPCPP_ROOT}/bin/clang \
-DCMAKE_CXX_COMPILER:PATH=${DPCPP_ROOT}/bin/dpcpp \
-DBUILD_CAPI_TESTS=ON \
../dpctl-capi
make V=1 -n -j 4 && make check && make install
# For more verbose tests use:
# cd tests
# ctest -V --progress --output-on-failure -j 4
# cd ..
popd
cp install/lib/*.so dpctl/
mkdir -p dpctl/include
cp -r dpctl-capi/include/* dpctl/include
export DPCTL_SYCL_INTERFACE_LIBDIR=dpctl
export DPCTL_SYCL_INTERFACE_INCLDIR=dpctl/include
export CC=${DPCPP_ROOT}/bin/clang
export CXX=${DPCPP_ROOT}/bin/dpcpp
# FIXME: How to pass this using setup.py? The fPIC flag is needed when
# dpcpp compiles the Cython generated cpp file.
export CFLAGS=-fPIC
python setup.py clean --all
python setup.py build develop
python -m unittest -v dpctl.tests