Commit d36e99b8 authored by Martin Schultz's avatar Martin Schultz

use BUILDTYPE environment variable in ci linux-configuration script

* removed hardcoded parts of buildpath from build script
* moved cmake_build_type from build script to config script
* set buildpath according to build type in config script
* removed hardcoded paths from ci-test script, as config script sets the
path
parent 6041f757
Pipeline #6632 failed with stages
in 28 minutes and 37 seconds
......@@ -7,6 +7,7 @@ set -e
# COMPILER= gcc/clang
# LANGUAGE= C++98 / C++11
# QTVERSION= QT4/QT5
# BUILDTYPE= Debug / Release
#include ci options script
......@@ -28,13 +29,13 @@ git clone git@roosevelt:moebius/OpenFlipper-Test-Data.git TestData
#########################################
# Make release build folder
if [ ! -d build-release-$BUILDPATH ]; then
mkdir build-release-$BUILDPATH
if [ ! -d $BUILDPATH ]; then
mkdir $BUILDPATH
fi
cd build-release-$BUILDPATH
cd $BUILDPATH
cmake -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
cmake -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
#build it
make $MAKE_OPTIONS
......
......@@ -2,14 +2,25 @@
OPTIONS=""
MAKE_OPTIONS=""
BUILDPATH=""
BUILDPATH="build-"
#set default Build type to Release
if ["$BUILDTYPE" == ""]; then
BUILDTYPE="Release"
fi
# set buildpath according to buildtype
BUILDPATH=$BUILDPATH-$BUILDTYPE-
#set CMake build Type
OPTIONS="-DCMAKE_BUILD_TYPE=$BUILDTYPE"
if [ "$COMPILER" == "gcc" ]; then
echo "Setting Compiler to GCC";
BUILDPATH="gcc"
# without icecc: no options required
OPTIONS="-DCMAKE_CXX_COMPILER=/usr/lib/icecc/bin/g++ -DCMAKE_C_COMPILER=/usr/lib/icecc/bin/gcc"
OPTIONS="$OPTIONS -DCMAKE_CXX_COMPILER=/usr/lib/icecc/bin/g++ -DCMAKE_C_COMPILER=/usr/lib/icecc/bin/gcc"
MAKE_OPTIONS="-j16"
export ICECC_CXX=/usr/bin/g++ ; export ICECC_CC=/usr/bin/gcc
......
......@@ -7,6 +7,7 @@ set -e
# COMPILER= gcc/clang
# LANGUAGE= C++98 / C++11
# QTVERSION= QT4/QT5
# BUILDTYPE= Debug / Release
#include ci options script
MY_DIR=$(dirname $(readlink -f $0))
......@@ -27,7 +28,7 @@ git clone git@roosevelt:moebius/OpenFlipper-Test-Data.git TestData
#########################################
# Run tests
cd build-release-$BUILDPATH
cd $BUILDPATH
#clean old cmake cache as the path might have changed
find . -name "CMakeCache.txt" -type f -delete
......@@ -43,7 +44,7 @@ then
rm DartConfiguration.tcl
fi
cmake -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
cmake -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
#tell the location to the libs from build jobs
export LD_LIBRARY_PATH=$(pwd)/Build/lib:$LD_LIBRARY_PATH
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment