only existing toolchains in build.sh

This commit is contained in:
Alex Janka 2022-07-22 16:59:43 +10:00
parent 76cbb2c271
commit 0a2cb5f6e6

View file

@ -1,6 +1,10 @@
if [ -z $1 ]; then if [ -z $1 ]; then
echo "No toolchain specified!" echo "No toolchain specified!"
return exit
fi
if [ ! -f toolchain-$1.cmake ]; then
echo "file doesntnt exist!"
exit
fi fi
cd source cd source
cmake -B cmake-build-install-$1 -DCMAKE_INSTALL_PREFIX=../$1 -DCMAKE_TOOLCHAIN_FILE=../toolchain-$1.cmake && cmake --build cmake-build-install-$1 --target install cmake -B build-install-$1 -DCMAKE_INSTALL_PREFIX=../$1 -DCMAKE_TOOLCHAIN_FILE=../toolchain-$1.cmake && echo "--- Finished configuring ---" && cmake --build build-install-$1 --target install