]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/jaeger-client-cpp/scripts/build.sh
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / jaeger-client-cpp / scripts / build.sh
1 #!/bin/bash
2
3 # Based on https://github.com/codecov/example-cpp11-cmake/blob/master/run_build.sh.
4
5 set -e
6
7 RED='\033[0;31m'
8 BLUE='\033[0;34m'
9 NO_COLOR='\033[0m'
10 GREEN='\033[0;32m'
11
12 function info() {
13 echo -e "${GREEN}$1${NO_COLOR}"
14 }
15
16 function working() {
17 echo -e "${BLUE}$1${NO_COLOR}"
18 }
19
20 function main() {
21 local project_dir
22 project_dir=$(git rev-parse --show-toplevel)
23 cd "$project_dir"
24
25 mkdir -p build
26 cd build
27 cmake ${CMAKE_OPTIONS} ..
28 make -j3 UnitTest
29 info "Running tests..."
30 ./UnitTest
31 working "All tests compiled and passed"
32
33 set -x
34 if ! [[ "${CMAKE_OPTIONS}" =~ "-DJAEGERTRACING_BUILD_CROSSDOCK=ON" ]]; then
35 exit 0
36 fi
37 make crossdock-fresh
38 }
39
40 main