QGIS/.ci/travis/linux/install.sh

80 lines
2.4 KiB
Bash
Raw Normal View History

2016-06-03 10:16:00 +02:00
###########################################################################
# install.sh
# ---------------------
2016-09-27 13:35:50 +02:00
# Date : March 2016
# Copyright : (C) 2016 by Matthias Kuhn
# Email : matthias at opengis dot ch
2016-06-03 10:16:00 +02:00
###########################################################################
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
###########################################################################
2016-09-27 13:35:50 +02:00
mkdir build
cd build
2015-12-09 10:43:11 +01:00
2016-09-27 13:35:50 +02:00
ln -s ${HOME}/osgeo4travis/bin/ccache ${HOME}/osgeo4travis/bin/clang++-${LLVM_VERSION}
ln -s ${HOME}/osgeo4travis/bin/ccache ${HOME}/osgeo4travis/bin/clang-${LLVM_VERSION}
ccache -s
2016-12-22 14:28:21 +01:00
ccache -z
2016-09-27 13:35:50 +02:00
export CXX="clang++-${LLVM_VERSION}"
export CC="clang-${LLVM_VERSION}"
#export CXX="g++-6"
#export CC="gcc-6"
export PATH=${HOME}/osgeo4travis/bin:${PATH}
export PYTHONPATH=${HOME}/osgeo4travis/lib/python3.3/site-packages/
cmake --version
${CC} --version
${CXX} --version
# CLANG_WARNINGS="-Wimplicit-fallthrough"
CLANG_WARNINGS=""
# Include this line for debug reasons
# -DCMAKE_BUILD_TYPE=RelWithDebInfo \
#
2016-11-24 13:39:21 +01:00
CMAKE_FLAGS="
-DCMAKE_PREFIX_PATH=/home/travis/osgeo4travis
-DWITH_STAGED_PLUGINS=ON
-DWITH_GRASS=ON
-DWITH_GRASS7=ON
-DGRASS_PREFIX7=/home/travis/osgeo4travis/grass-7.0.4
-DSUPPRESS_QT_WARNINGS=ON
-DENABLE_MODELTEST=ON
-DENABLE_PGTEST=ON
-DWITH_QSPATIALITE=ON
-DWITH_QWTPOLAR=OFF
-DWITH_APIDOC=ON
-DWITH_ASTYLE=OFF
2016-11-24 13:39:21 +01:00
-DWITH_INTERNAL_YAML=OFF
-DDISABLE_DEPRECATED=ON
-DCXX_EXTRA_FLAGS=${CLANG_WARNINGS}
"
# The following options trigger a minimalized build to
# reduce the travis build time so we don't time out and
# have a chance of slowly filling the ccache.
if [ "$CACHE_WARMING" = true ] ; then
CMAKE_FLAGS="
${CMAKE_FLAGS}
-DWITH_DESKTOP=OFF
-DWITH_SERVER=OFF
2017-02-06 07:21:37 +01:00
-DWITH_CUSTOM_WIDGETS=OFF
2016-11-24 13:39:21 +01:00
"
else
CMAKE_FLAGS="
${CMAKE_FLAGS}
-DWITH_DESKTOP=ON
-DWITH_SERVER=ON
2017-02-06 07:21:37 +01:00
-DWITH_CUSTOM_WIDGETS=ON
2016-11-24 13:39:21 +01:00
"
fi
cmake $CMAKE_FLAGS ..