Addition of a small script to easily rebuild all targets
This commit is contained in:
parent
aad2501499
commit
c8e1ba69ad
1 changed files with 33 additions and 0 deletions
33
rebuildall.sh
Executable file
33
rebuildall.sh
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function cd {
|
||||||
|
if (("$#" > 0)); then
|
||||||
|
if [ "$1" == "-" ]; then
|
||||||
|
popd &> /dev/null
|
||||||
|
return $?
|
||||||
|
else
|
||||||
|
pushd "$@" &> /dev/null
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cd $HOME
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
for z in Debug Release Final
|
||||||
|
do
|
||||||
|
cd $z
|
||||||
|
retCode=$?
|
||||||
|
if [ $retCode != 0 ]; then
|
||||||
|
mkdir $z && cd $z
|
||||||
|
retCode=$?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $retCode == 0 ]; then
|
||||||
|
rm -rf *
|
||||||
|
cmake ../../ -DCMAKE_BUILD_TYPE=$z
|
||||||
|
make -j2
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Reference in a new issue