view setup.sh @ 58:7b7e84356b39

Introduce API for fine tuning inserts. Reduce the amount of rebuilds.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Fri, 14 Sep 2012 00:04:24 +0200
parents aae83c0a771d
children a591accb07b5
line wrap: on
line source

#!/bin/sh

ADD_DEFINITION() {
    KEY=$1
    VALUE=$(eval "echo \${${KEY}}")
    if [ -n "${VALUE}" ]
    then
	DEFINITIONS="${DEFINITIONS} -D${KEY}=${VALUE}"
    fi
}

LOCATION=$(dirname $0)

if [ -f ~/.auto_cmake ]
then
  . ~/.auto_cmake
fi

DEFINITIONS=""

ADD_DEFINITION BOOST_ROOT
ADD_DEFINITION QT_QMAKE_EXECUTABLE

eval "cmake ${DEFINITIONS} ${LOCATION}"