diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:55 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:55 +0100 |
commit | 062cd07342edc2b003555e90dd2cee0514b9f64a (patch) | |
tree | 3c73893dae8a9380c9f24e9c5822c5ec6bf671d5 /vendor/bandit/cross_compile.sh | |
parent | ffee481435ac0afe3f9a5a3eb07b2f2a46467089 (diff) |
Add BanditCpp 1.1.4 test harness
Diffstat (limited to 'vendor/bandit/cross_compile.sh')
-rwxr-xr-x | vendor/bandit/cross_compile.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/vendor/bandit/cross_compile.sh b/vendor/bandit/cross_compile.sh new file mode 100755 index 00000000..e8de39f7 --- /dev/null +++ b/vendor/bandit/cross_compile.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +function build_for { + CC=$1 + CXX=$2 + BUILD_DIR=build-$CC + + mkdir $BUILD_DIR + pushd $BUILD_DIR + CC=$CC CXX=$CXX cmake ../.. + make + popd +} + +if [[ -d builds ]]; then + rm -rf builds +fi + +mkdir builds +pushd builds + +build_for gcc-4.5 g++-4.5 +GCC45=$? + +build_for gcc-4.6 g++-4.6 +GCC46=$? + +build_for gcc-4.7 g++-4.7 +GCC47=$? + +build_for gcc-4.8 g++-4.8 +GCC48=$? + +build_for clang clang++ +CLANG=$? + +popd + +echo +echo "Result:" +echo -e "gcc-4.5:\t$GCC45" +echo -e "gcc-4.6:\t$GCC46" +echo -e "gcc-4.7:\t$GCC47" +echo -e "gcc-4.8:\t$GCC48" +echo -e "clang:\t$CLANG" +echo "Done" +exit $(( $GCC45 + $GCC46 + $GCC47 + $GCC48 + $CLANG )) |