Skip to content

Commit

Permalink
added cmake generetor
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayyadav3016 committed Dec 21, 2014
1 parent 63e50af commit caafdd1
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions genCMake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash -
#===============================================================================
#
# FILE: genCMake.sh
#
# USAGE: ./genCMake.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: YOUR NAME (),
# ORGANIZATION:
# CREATED: Sunday 21 December 2014 20:30
# REVISION: ---
#===============================================================================

set -o nounset # Treat unset variables as an error

mkdir -p build
cd build
str=""
case $1 in
avr)
str="-DCMAKE_TOOLCHAIN_FILE=~/cmakefiles/avr-toolchain.cmake"
cmake "${str}" $@ ..
make
shift
;;
arm)
str="-DCMAKE_TOOLCHAIN_FILE=~/cmakefiles/arm-toolchain.cmake"
source ${PROJECTS}/ros-projects-arm/env-arm-ros.sh
cmake "${str}" $@ ..
make
shift
;;
pc)
cmake $@ ..
make
;;
*)
echo "Error please give a platform to build tool"
;;
esac
cd ..

0 comments on commit caafdd1

Please sign in to comment.