view setup.sh @ 85:1f9e27a0bd7f

Allow for lazy calculation of checksums, ignore them, if only one file of given size.
author Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no>
date Thu, 10 Oct 2013 15:55:30 +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}"