Release/Debug builds support

This commit is contained in:
Enno Rehling 2014-06-28 16:54:10 -07:00
parent 612dfea36f
commit ba53c90b9c
2 changed files with 6 additions and 3 deletions

View File

@ -4,11 +4,12 @@ while [ ! -d $ROOT/.git ]; do
ROOT=$(dirname $ROOT) ROOT=$(dirname $ROOT)
done done
[ -z $BUILD ] && BUILD=Debug
MACHINE=`uname -m` MACHINE=`uname -m`
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc" [ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc" [ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" [ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
BIN_DIR="build-$MACHINE-$CC-Debug" BIN_DIR="build-$MACHINE-$CC-$BUILD"
[ -z "$JOBS" ] && JOBS=$(nproc) [ -z "$JOBS" ] && JOBS=$(nproc)
DISTCC=`which distcc` DISTCC=`which distcc`

View File

@ -8,11 +8,13 @@ while [ ! -d $ROOT/.git ]; do
fi fi
done done
[ -z $BUILD ] && BUILD=Debug
MACHINE=`uname -m` MACHINE=`uname -m`
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc" [ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc" [ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" [ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
BIN_DIR="build-$MACHINE-$CC-Debug" BIN_DIR="build-$MACHINE-$CC-$BUILD"
mkdir -p $BIN_DIR
cd $BIN_DIR cd $BIN_DIR
if [ ! -e ../CMakeLists.txt ]; then if [ ! -e ../CMakeLists.txt ]; then
@ -37,7 +39,7 @@ fi
cmake .. \ cmake .. \
-DCMAKE_MODULE_PATH=$PWD/../cmake/Modules \ -DCMAKE_MODULE_PATH=$PWD/../cmake/Modules \
-DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_BUILD_TYPE=$BUILD \
-DCMAKE_LIBRARY_PATH=$LIBRARY_PATH \ -DCMAKE_LIBRARY_PATH=$LIBRARY_PATH \
-DCMAKE_INCLUDE_PATH=$INCLUDE_PATH \ -DCMAKE_INCLUDE_PATH=$INCLUDE_PATH \
-DCMAKE_PREFIX_PATH=$PREFIX_PATH \ -DCMAKE_PREFIX_PATH=$PREFIX_PATH \