#!/bin/sh
set -e
mkdir build
cd build

cmake -G Ninja ${CMAKE_ARGS} \
  -DCMAKE_PREFIX_PATH=${PREFIX} \
  -DCMAKE_INSTALL_PREFIX=${PREFIX} \
  -DCMAKE_BUILD_TYPE=Release \
  ..

cmake --build .

cmake --install .

# Build and run some basic tests
cmake  --build .  --target basicstuff
ctest -R basicstuff*
