summaryrefslogtreecommitdiff
path: root/run/dcpomatic_cli
blob: b32462e59a090ba88754460b3323775423850149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $DIR/environment

binary=$DIR/../build/src/tools/dcpomatic2_cli

if [ "$1" == "--debug" ]; then
    shift
    gdb --args $binary "$@"
elif [ "$1" == "--valgrind" ]; then
    shift
#    valgrind --tool="memcheck" --num-callers=24 --suppressions=suppressions build/src/tools/dcpomatic2_cli "$@"
    valgrind --tool="memcheck" --leak-check=full --show-reachable=yes --num-callers=24 --suppressions=suppressions $binary "$@"
elif [ "$1" == "--callgrind" ]; then
    shift
    valgrind --tool="callgrind" $binary "$@"
else
    $binary "$@"
fi