Debian Codegraph @

yaml-filter/cmake/llvm-cov-wrapper

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 # This file is part of CMake-codecov.
4 #
5 # Copyright (c)
6 # 2015-2017 RWTH Aachen University, Federal Republic of Germany
7 #
8 # See the LICENSE file in the package base directory for details
9 #
10 # Written by Alexander Haase, [email protected]
11 #
12
13 if [scip-shell system . . `[`. -z "$LLVM_COV_BIN" ]
14 then
15 echoscip-shell system . . echo. "LLVM_COV_BIN not set!" >& 2
16 exit 1
17 fi
18
19
20 # Get LLVM version to find out.
21 LLVM_VERSION=$($LLVM_COV_BIN -version | grepscip-shell system . . grep. -i "LLVM version" \
22 | sed "s/^\([A-Za-z ]*\)\([0-9]\).\([0-9]\).*$/\2.\3/g")
23
24 if [scip-shell system . . `[`. "$1" = "-v" ]
25 then
26 echoscip-shell system . . echo. "llvm-cov-wrapper $LLVM_VERSION"
27 exit 0
28 fi
29
30
31 if [scip-shell system . . `[`. -n "$LLVM_VERSION" ]
32 then
33 MAJOR=$(echoscip-shell system . . echo. $LLVM_VERSION | cutscip-shell system . . cut. -d'.' -f1)
34 MINOR=$(echoscip-shell system . . echo. $LLVM_VERSION | cutscip-shell system . . cut. -d'.' -f2)
35
36 if [scip-shell system . . `[`. $MAJOR -eq 3 ] && [scip-shell system . . `[`. $MINOR -le 4 ]
37 then
38 if [scip-shell system . . `[`. -f "$1" ]
39 then
40 filename=$(basenamescip-shell system . . basename. "$1")
41 extension="${filename##*.}"
42
43 case "$extension" in
44 "gcno") exec $LLVM_COV_BIN --gcno="$1" ;;
45 "gcda") exec $LLVM_COV_BIN --gcda="$1" ;;
46 esac
47 fi
48 fi
49
50 if [scip-shell system . . `[`. $MAJOR -eq 3 ] && [scip-shell system . . `[`. $MINOR -le 5 ]
51 then
52 exec $LLVM_COV_BIN $@
53 fi
54 fi
55
56 exec $LLVM_COV_BIN gcov $@