From ba53c90b9c5f5e0d58b2bddb1343bbe9f3f3a6f0 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 28 Jun 2014 16:54:10 -0700 Subject: [PATCH] Release/Debug builds support --- s/build | 3 ++- s/cmake-init | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/s/build b/s/build index b6701cb87..ab29c20ad 100755 --- a/s/build +++ b/s/build @@ -4,11 +4,12 @@ while [ ! -d $ROOT/.git ]; do ROOT=$(dirname $ROOT) done +[ -z $BUILD ] && BUILD=Debug MACHINE=`uname -m` [ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc" [ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc" [ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" -BIN_DIR="build-$MACHINE-$CC-Debug" +BIN_DIR="build-$MACHINE-$CC-$BUILD" [ -z "$JOBS" ] && JOBS=$(nproc) DISTCC=`which distcc` diff --git a/s/cmake-init b/s/cmake-init index 454557354..361825423 100755 --- a/s/cmake-init +++ b/s/cmake-init @@ -8,11 +8,13 @@ while [ ! -d $ROOT/.git ]; do fi done +[ -z $BUILD ] && BUILD=Debug MACHINE=`uname -m` [ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc" [ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc" [ -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 if [ ! -e ../CMakeLists.txt ]; then @@ -37,7 +39,7 @@ fi cmake .. \ -DCMAKE_MODULE_PATH=$PWD/../cmake/Modules \ - -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_BUILD_TYPE=$BUILD \ -DCMAKE_LIBRARY_PATH=$LIBRARY_PATH \ -DCMAKE_INCLUDE_PATH=$INCLUDE_PATH \ -DCMAKE_PREFIX_PATH=$PREFIX_PATH \