summaryrefslogtreecommitdiff
path: root/vendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2020-05-22 19:57:41 -0700
committerManoj Srivastava <srivasta@debian.org>2020-05-22 20:02:19 -0700
commitc3d2579ad8d7eb33059aa8fdbaf5b564411a57f2 (patch)
tree1570cda0676fdcf4171a69a7fe313c1b89a52b0c /vendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh
parent986b7742bf244b4073ecca0723615f70be8a1ab6 (diff)
parent4e9b9c402ed95bf9a17fd6d795bc49bb4128a6fa (diff)
Merge branch 'upstream' into debian-cmake-fixes
Diffstat (limited to 'vendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh')
-rwxr-xr-xvendor/bandit/bandit/assertion_frameworks/snowhouse/cross_compile.sh50
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