#!/bin/sh

echo "-------------------------------------------------------------------"
echo "* NOTE: Attempting to configure a UW-esk build"
echo "* which will build and link specfic versions of externals"
echo "* that may not be the version your system distros with!"
echo "* so if you are not UW, namely a package maintainer for distro xyz"
echo "* you will likely want to run \"cmake .\""
echo "*"
echo "* add -D_DEBUG:BOOL=FALSE to get non-optimized code for debugging"
echo "* Another option would be to run ccmake or cmake-gui"
echo "-------------------------------------------------------------------"
PWD=`pwd`
if [ `uname` = "Darwin" ] ; then
  # By default, cmake will use gcc and c++ for the C and C++ compilers.
  # On newer macs, these invoke different compilers (llvm gnu and clang,
  # respectively).
  CC=gcc
  export CC
  CXX=g++
  export CXX
fi
cmake -DUW_BUILD:BOOL=TRUE -D_VERBOSE:BOOL=TRUE -DBUILDID:STRING=UW_development -DCMAKE_INSTALL_PREFIX:PATH=${PWD}/release_dir "$@"
