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:
parent
1142b8d5e4
commit
693c7aa069
1 changed files with 21 additions and 1 deletions
22
build.sh
22
build.sh
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue