scitools_understand_buildspy.sh 670 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. #
  3. # This script generates project file for SciTools Understand via buildspy.
  4. #
  5. buildspy_dir="$1"
  6. uavcan_dir="$(readlink -f $(dirname $0)/..)"
  7. function die() { echo $1; exit 1; }
  8. [ -z "$buildspy_dir" ] && die "Path to buildspy directory expected, e.g. ~/opt/scitools/bin/linux64/buildspy/"
  9. compiler="$buildspy_dir/g++wrapper"
  10. buildspy="$buildspy_dir/buildspy"
  11. echo "Pathes:"
  12. echo "compiler: $compiler"
  13. echo "buildspy: $buildspy"
  14. echo "uavcan: $uavcan_dir"
  15. read -p "Looks good? (y/N) " confirm
  16. [[ $confirm == "y" ]] || die "Bye"
  17. cmake "$uavcan_dir" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER="$compiler" || exit 1
  18. $buildspy -db uavcan.udb -cmd make