add some options to build-me.sh script
This commit is contained in:
parent
26f1d93379
commit
cb85793ede
|
@ -5,6 +5,27 @@ BN=`basename $0`
|
||||||
TMPSRC="../.."
|
TMPSRC="../.."
|
||||||
BLDLOG="bldlog-1.txt"
|
BLDLOG="bldlog-1.txt"
|
||||||
|
|
||||||
|
wait_for_input()
|
||||||
|
{
|
||||||
|
if [ "$#" -gt "0" ] ; then
|
||||||
|
echo "$1"
|
||||||
|
fi
|
||||||
|
echo -n "Enter y to continue : "
|
||||||
|
read char
|
||||||
|
if [ "$char" = "y" -o "$char" = "Y" ]
|
||||||
|
then
|
||||||
|
echo "Got $char ... continuing ..."
|
||||||
|
else
|
||||||
|
if [ "$char" = "" ] ; then
|
||||||
|
echo "Aborting ... no input!"
|
||||||
|
else
|
||||||
|
echo "Aborting ... got $char!"
|
||||||
|
fi
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# exit 0
|
||||||
|
}
|
||||||
|
|
||||||
if [ -f "$BLDLOG" ]; then
|
if [ -f "$BLDLOG" ]; then
|
||||||
rm -f $BLDLOG
|
rm -f $BLDLOG
|
||||||
fi
|
fi
|
||||||
|
@ -21,9 +42,16 @@ TMPOPTS=""
|
||||||
# TMPOPTS="$TMPOPTS -DBUILD_SHARED_LIB:BOOL=TRUE"
|
# TMPOPTS="$TMPOPTS -DBUILD_SHARED_LIB:BOOL=TRUE"
|
||||||
|
|
||||||
for arg in $@; do
|
for arg in $@; do
|
||||||
TMPOPTS="$TMPOPTS $arg"
|
case $arg in
|
||||||
|
VERBOSE) TMPOPTS="$TMPOPTS -DCMAKE_VERBOSE_MAKEFILE=ON" ;;
|
||||||
|
DEBUG) TMPOPTS="$TMPOPTS -DCMAKE_BUILD_TYPE=Debug -DENABLE_DEBUG_SYMBOLS:BOOL=TRUE" ;;
|
||||||
|
SHARED) TMPOPTS="$TMPOPTS -DBUILD_SHARED_LIB:BOOL=TRUE" ;;
|
||||||
|
*) TMPOPTS="$TMPOPTS $arg" ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "$BN: Will do: 'cmake $TMPSRC $TMPOPTS' to $BLDLOG"
|
||||||
|
wait_for_input
|
||||||
|
|
||||||
echo "$BN: Doing: 'cmake $TMPSRC $TMPOPTS' to $BLDLOG"
|
echo "$BN: Doing: 'cmake $TMPSRC $TMPOPTS' to $BLDLOG"
|
||||||
cmake $TMPSRC $TMPOPTS >> $BLDLOG 2>&1
|
cmake $TMPSRC $TMPOPTS >> $BLDLOG 2>&1
|
||||||
|
|
Loading…
Reference in a new issue