1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-16 03:44:56 +02:00

build.sh: handle build type option to cmake.

This commit is contained in:
Henrik Hautakoski 2020-01-28 12:31:13 +01:00
parent 1142b8d5e4
commit 693c7aa069

View file

@ -2,6 +2,26 @@
mkdir build 2> /dev/null
pushd build > /dev/null
cmake .. $@
function usage() {
echo "Usage: ${0##*/} [ -h ] [ -t Debug|Release|RelWithDebInfo|MinSizeRel ]"
exit 1
}
ARGS=""
while getopts ":h?t:" opt; do
case "${opt}" in
t) ARGS="${ARGS} -DCMAKE_BUILD_TYPE=${OPTARG}" ;;
h) usage ;;
:) echo "Error: -${OPTARG} requires a value"
exit 1
;;
esac
done
shift $((OPTIND-1))
cmake $ARGS $@ ..
make -B
popd > /dev/null