File: setup_workspace.sh

package info (click to toggle)
iqtree 2.0.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 14,620 kB
  • sloc: cpp: 142,571; ansic: 57,789; sh: 275; python: 242; makefile: 95
file content (32 lines) | stat: -rwxr-xr-x 845 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /bin/bash

# This script is for when you intend to actually work on the code.
# Do not use it, if all you want to do is build the library for
# actual use. If that is what you want, just go through the usual
# way steps for building a cmake-project.

ln -s "../../scripts/pre-commit" ".git/hooks/pre-commit"

if command -v "ninja" >/dev/null; then
	echo "found ninja"
	BUILD_BACKEND="-GNinja"
else
	echo "failed to find ninja"
	BUILD_BACKEND=""
fi

CC=$(which clang)
CXX=$(which clang++)

mkdir "build"
mkdir "build/release"
mkdir "build/debug"

cd "build/release"
CC=$CC CXX=$CXX cmake "-DCMAKE_BUILD_TYPE=Release" "-DDEV_ENVIRONMENT=ON" "-DBUILD_TESTS=ON" "$BUILD_BACKEND"  "../.."
cd "../.."

cd "build/debug"
CC=$CC CXX=$CXX cmake "-DCMAKE_BUILD_TYPE=Debug" "-DDEV_ENVIRONMENT=ON" "-DBUILD_TESTS=ON" "$BUILD_BACKEND"  "../.."
cd "../.."