#!/bin/sh

if [ -z "$1" ]; then
    BUILD_TYPE=Release
else
    BUILD_TYPE="$1"
fi

if [ -z "$2" ]; then
    INSTALL_PREFIX=/tmp
else
    INSTALL_PREFIX="$2"
fi

echo "-- Using BUILD_TYPE=${BUILD_TYPE}, INSTALL_PREFIX=${INSTALL_PREFIX}"

cmake ../                                       \
    -DCMAKE_BUILD_TYPE=${BUILD_TYPE}            \
    -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX      \
    -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wconversion"

