DBT-RISE-TGC/etc/cmake.sh

17 lines
259 B
Bash
Raw Normal View History

2018-04-06 01:44:07 +02:00
#!/bin/sh
##
if [ -n "$1" ]; then
suffix=$1
else
suffix=Debug
fi
2018-04-06 01:44:07 +02:00
cwd=`pwd`
for i in $*; do
if echo "$i" | grep 'CMAKE_BUILD_TYPE='; then
suffix=`echo $i | sed 's/-DCMAKE_BUILD_TYPE=//'`
fi
done
mkdir -p build/$suffix && cd build/$suffix
cmake $* $cwd