Added script to generate SciTols Understand project file using buildspy

This commit is contained in:
Pavel Kirienko 2014-04-18 16:58:18 +04:00
parent 9a04bc6dbc
commit d1d42e83a7

View File

@ -0,0 +1,26 @@
#!/bin/sh
#
# This script generates project file for SciTools Understand via buildspy.
#
buildspy_dir="$1"
uavcan_dir="$(readlink -f $(dirname $0)/..)"
function die() { echo $1; exit 1; }
[ -z "$buildspy_dir" ] && die "Path to buildspy directory expected, e.g. ~/opt/scitools/bin/linux64/buildspy/"
compiler="$buildspy_dir/g++wrapper"
buildspy="$buildspy_dir/buildspy"
echo "Pathes:"
echo "compiler: $compiler"
echo "buildspy: $buildspy"
echo "uavcan: $uavcan_dir"
read -p "Looks good? (y/N) " confirm
[[ $confirm == "y" ]] || die "Bye"
cmake "$uavcan_dir" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER="$compiler" || exit 1
$buildspy -db uavcan.udb -cmd make