Mercurial > dedupe
changeset 98:a591accb07b5
Support for CCACHE and automatically download needed packages on Debian.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Thu, 13 Feb 2014 14:52:23 +0100 |
| parents | 34f11b2a1178 |
| children | b821d6270741 |
| files | setup.sh |
| diffstat | 1 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.sh Thu Feb 13 14:51:06 2014 +0100 +++ b/setup.sh Thu Feb 13 14:52:23 2014 +0100 @@ -9,8 +9,21 @@ fi } +USE() { + KEY=$1 + VALUE=$(eval "echo \${${KEY}}") + [ "${VALUE}" = "true" ] +} + LOCATION=$(dirname $0) +if [ -f /etc/debian_version ] +then + NEEDED_PACKAGES="g++ libqt4-dev libsqlite3-dev libboost-filesystem-dev libboost-test-dev" + dpkg -s ${NEEDED_PACKAGES} || + sudo apt-get install ${NEEDED_PACKAGES} +fi + if [ -f ~/.auto_cmake ] then . ~/.auto_cmake @@ -20,5 +33,9 @@ ADD_DEFINITION BOOST_ROOT ADD_DEFINITION QT_QMAKE_EXECUTABLE +if USE CCACHE +then + DEFINITIONS="${DEFINITIONS} -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc" +fi -eval "cmake ${DEFINITIONS} ${LOCATION}" +eval "cmake -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ ${DEFINITIONS} ${LOCATION}"
