diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-10-27 19:25:50 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-10-27 19:25:50 +0100 |
commit | 867823f4429b1215cd5c3aa6d2415fb324429891 (patch) | |
tree | 2915f6c2e0acae69ad2b738e0038766354d60856 /vendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh | |
parent | f005efee43bdb2e9749b02f73b876bf2c1145f1b (diff) | |
parent | 47fb7807d77c92fa6e72017501d9355d780adf40 (diff) |
Merge branch 'cpp'
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 |