-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63e50af
commit caafdd1
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .. |