From c1031bbfeebdc8c8626fc85f30c6e486f1215d27 Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Mon, 26 Jan 2015 18:13:53 +0000 Subject: [PATCH] Update qt build script to set nvidia or native configs from commandline --- Builds/QtCreator/build_all.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Builds/QtCreator/build_all.sh b/Builds/QtCreator/build_all.sh index 6eabff5..600a1e8 100755 --- a/Builds/QtCreator/build_all.sh +++ b/Builds/QtCreator/build_all.sh @@ -1,14 +1,35 @@ #!/bin/bash +REBUILD='' +NVIDIA='' +NATIVE='' + +while test $# -gt 0 +do + case "$1" in + --rebuild) REBUILD='1' + ;; + --nvidia) NVIDIA="CONFIG += nvidia" + ;; + --native) NATIVE="CONFIG += native" + ;; + --*) echo "bad option $1"; exit 1 + ;; + *) echo "unrecognised argument $1"; exit 1 + ;; + esac + shift +done + DIR=$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd ) for PROJ in ${DIR}/{Ember,EmberCL,EmberGenome,EmberRender,EmberAnimate,Fractorium} do pushd $PROJ - if [ "x--rebuild" = "x$1" ]; then + if [ "x1" = "x$REBUILD" ]; then make clean fi - qmake + qmake "$NVIDIA" "$NATIVE" make -j9 if [ "x$?" != "x0" ]; then echo "Build failed! Check output for errors."