#!/bin/sh
set -e

srcdir=$(pwd)

cp -a . $AUTOPKGTEST_TMP
cd $AUTOPKGTEST_TMP
mkdir build
cd build
cmake -DOPENCL_LIB_DIR=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) -DCMOCK_DIR=/usr/share/cmock -DUNITY_DIR=/usr/share/cmock/vendor/unity ..
rm -rf ../include/CL
make -C examples
make -C tests
make -C tests test
