diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-08-01 16:35:25 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-09-14 05:58:27 +0200 |
commit | 7b9f4e4e8169ca2fad3a1c7ca03f07ecfc46678e (patch) | |
tree | 0cef1ac0dc228b621afc90bc94e4e0dddcb90c82 /vendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh | |
parent | c6196b25d119a10e79deedef26a73e0d5a021b0e (diff) |
Bandit 2.0.0
Diffstat (limited to 'vendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh')
-rwxr-xr-x | vendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh b/vendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh new file mode 100755 index 00000000..d3a73279 --- /dev/null +++ b/vendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +STATUS="" + +function build_for { + local CC=$1 + local CXX=$2 + local CXX_VERSION=$3 + + echo "Compiling for $CC, $CXX, $CXX_VERSION..." + + if [[ "$CXX_VERSION" == "CXX" ]]; then + local SNOWHOUSE_IS_CPP11=OFF + else + local SNOWHOUSE_IS_CPP11=ON + fi + + echo "SNOWHOUSE_IS_CPP11=$SNOWHOUSE_IS_CPP11" + + BUILD_DIR=build-$CC-$CXX_VERSION + mkdir $BUILD_DIR + pushd $BUILD_DIR + CC=$CC CXX=$CXX cmake -DSNOWHOUSE_IS_CPP11=$SNOWHOUSE_IS_CPP11 ../.. + make + STATUS="$STATUS\n$BUILD_DIR - Status: $?" + popd +} + +if [[ -d builds ]]; then + rm -rf builds +fi + +mkdir builds +pushd builds + +build_for gcc-4.5 g++-4.5 CXX +build_for gcc-4.6 g++-4.6 CXX +build_for gcc-4.6 g++-4.6 CXX11 +build_for gcc-4.7 g++-4.7 CXX +build_for gcc-4.7 g++-4.7 CXX11 +build_for gcc-4.8 g++-4.8 CXX +build_for gcc-4.8 g++-4.8 CXX11 +build_for gcc-4.9 g++-4.9 CXX +build_for gcc-4.9 g++-4.9 CXX11 +build_for clang clang++ CXX +build_for clang clang++ CXX11 +popd + +echo "============================================" +echo -e $STATUS |