aboutsummaryrefslogtreecommitdiffstats
path: root/vpp-api-test/vat/json_test.c
diff options
context:
space:
mode:
authorMiroslav Miklus <mmiklus@cisco.com>2016-07-15 09:22:48 +0200
committerDave Wallace <dwallacelf@gmail.com>2016-07-18 13:13:17 +0000
commit4575fb2df7ba69e0ed85b30d49730845dbb9f966 (patch)
tree20abca484af4933f308eb951986050cf2ec35706 /vpp-api-test/vat/json_test.c
parented740a968ac54a64ca6771e097dc5f9b8edc5811 (diff)
Use oper-160710 CSIT branch for 'verify' jobs
Change-Id: I798a1f4168a6d3e60fc9f115b33cd7a5b2782df6 Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
Diffstat (limited to 'vpp-api-test/vat/json_test.c')
0 files changed, 0 insertions, 0 deletions
066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/bash

VPP_DIR=$(dirname ${BASH_SOURCE[0]})/../..
VPP_TOOLCHAIN_FILE=$VPP_DIR/extras/scripts/.config/macos.toolchain
BUILD_PATCH=$VPP_DIR/extras/scripts/patches/macos_build_externals.patch
VPP_EXPORT_CC=""

function help() {
cat << __EOF__
Usage: $0 [COMMAND]
conf <dir>        create the configuration file
                  with the give cross-toolchain directory
build             run Macos <make build>
build-release     run Macos <make build-release>
compile_commands  Generate compile_commands.json
__EOF__
}

function create_toolchain_file () {
    if [ x$1 = x ]; then
        echo "Please specify the cross toolchain directory"
        exit 1
    fi
    XCHAIN=$1
    if [ ! -e  ]; then
      mkdir -p $VPP_DIR/extras/scripts/.config
      echo "
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)

# specify the cross compiler
SET(CMAKE_C_COMPILER   $XCHAIN/x86_64-ubuntu16.04-linux-gnu/bin/x86_64-ubuntu16.04-linux-gnu-gcc)
SET(CMAKE_CXX_COMPILER $XCHAIN/x86_64-ubuntu16.04-linux-gnu/bin/x86_64-ubuntu16.04-linux-gnu-g++)

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH  $XCHAIN/x86_64-ubuntu16.04-linux-gnu $XCHAIN/x86_64-ubuntu16.04-linux-gnu/x86_64-ubuntu16.04-linux-gnu/sysroot/)

SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_SYSTEM_PROCESSOR x86_64)
# This is needed to build vpp-papi
SET(PYTHON_EXECUTABLE /usr/local/bin/python)" | tee $VPP_TOOLCHAIN_FILE > /dev/null
      echo "Configration file created"
      echo "please edit $VPP_TOOLCHAIN_FILE"
    else
      echo "configuration file already exists"
      echo "please edit $VPP_TOOLCHAIN_FILE"
    fi
}

function vpp_make () {
  cd $VPP_DIR ; git apply $BUILD_PATCH
  trap "cd $VPP_DIR ; git apply -R $BUILD_PATCH" EXIT
  export VPP_EXTRA_CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=${VPP_TOOLCHAIN_FILE} -DCMAKE_EXPORT_COMPILE_COMMANDS=${VPP_EXPORT_CC}" ; make -C $VPP_DIR $1
}

case $1 in
    conf)
        create_toolchain_file $2
        ;;
    build)
        vpp_make build
        ;;
    build-release)
        vpp_make build-release
        ;;
    compile_commands)
        VPP_EXPORT_CC=ON vpp_make build
        echo "compile_commands.json should be generated"
        echo "check $VPP_DIR/build-root/build-vpp_debug-native/vpp/compile_commands.json"
        ;;
    *)
        help
        ;;
esac