Skip to content

Instantly share code, notes, and snippets.

@bwasti
Last active October 4, 2022 22:53
Show Gist options
  • Save bwasti/b892a2dce0e6dd2dc23920b4694f83a5 to your computer and use it in GitHub Desktop.
Save bwasti/b892a2dce0e6dd2dc23920b4694f83a5 to your computer and use it in GitHub Desktop.
read -p "this script will remove libarrayfire from your system and install all requirements to build from source. continue? [Y/n]" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo apt remove libarrayfire-dev libarrayfire-cpu3 libarrayfire-cpu-dev
sudo apt install -y libblas-dev liblapack-dev liblapacke-dev libfftw3-dev libboost-all-dev cmake make g++
cd /tmp
rm -rf arrayfire
git clone https://github.com/arrayfire/arrayfire.git
cd arrayfire
cmake -Bbuild -DAF_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DAF_BUILD_UNIFIED=OFF -DAF_TEST_WITH_MTX_FILES=OFF
make -j -Cbuild
sudo make install -Cbuild
else
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment