File: run-debug

package info (click to toggle)
qtox 1.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 28,996 kB
  • sloc: cpp: 48,067; xml: 8,560; python: 704; sh: 232; makefile: 14
file content (22 lines) | stat: -rwxr-xr-x 552 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

set -euxo pipefail

readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR/../"

PRESET=${1:-release}
DEBUGGER=${2:-none}

if [ "$DEBUGGER" = "none" ]; then
  DEBUGGER=()
elif [ "$DEBUGGER" = "lldb" ]; then
  DEBUGGER=(lldb -o run)
else
  DEBUGGER=("$DEBUGGER")
fi

test -d "_build-$PRESET" || cmake --preset "static-$PRESET"
ln -sf "_build-$PRESET/compile_commands.json" compile_commands.json
cmake --build "_build-$PRESET" --target qtox
"${DEBUGGER[@]}" "_build-$PRESET/qtox.app/Contents/MacOS/qtox"