X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fexternal%2Fbackward-cpp%2Fbuilds.sh;fp=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fexternal%2Fbackward-cpp%2Fbuilds.sh;h=6e1fb2074ed10cc01327f326053eb647026b71f4;hb=e26c1ec581be598521517829adba8c8dd23a768f;hp=0000000000000000000000000000000000000000;hpb=6699c1aea74eeb0eb400e6299079f0c7576f716f;p=iec.git diff --git a/src/type3_AndroidCloud/anbox-master/external/backward-cpp/builds.sh b/src/type3_AndroidCloud/anbox-master/external/backward-cpp/builds.sh new file mode 100644 index 0000000..6e1fb20 --- /dev/null +++ b/src/type3_AndroidCloud/anbox-master/external/backward-cpp/builds.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +COMPILERS_CXX98=`cat</dev/null + ( + cd "$builddir" + cmake -DCMAKE_BUILD_TYPE=$buildtype -DBACKWARD_TESTS=ON .. + ) +} + +function build() { + local builddir=$1 + shift + make -C "$builddir" $@ +} + +function dotest() { + local builddir=$1 + shift + make -C "$builddir" test $@ + return 0 +} + +function do_action() { + local lang=$1 + local action=$2 + shift 2 + + for compiler in $COMPILERS; do + local builddir="build_${lang}_${compiler}" + + if [[ $action == "cmake" ]]; then + buildtype=$1 + mkbuild $compiler $lang "$buildtype" "$builddir" + [[ $? != 0 ]] && exit + elif [[ $action == "make" ]]; then + build "$builddir" $@ + [[ $? != 0 ]] && exit + elif [[ $action == "test" ]]; then + dotest "$builddir" $@ + [[ $? != 0 ]] && exit + elif [[ $action == "clean" ]]; then + rm -r "$builddir" + else + echo "usage: $0 cmake [debug|release|relwithdbg]|make|test|clean" + exit 255 + fi + done +} + +COMPILERS=$COMPILERS_CXX98 +do_action c++98 $@ +COMPILERS=$COMPILERS_CXX11 +do_action c++11 $@