summaryrefslogtreecommitdiff
path: root/evergreen/ninja_compile.sh
blob: f3b51ae5e1d2d4653c43bf1daf948ffcef66b7b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"

cd src

set -o errexit
set -o verbose
activate_venv
python -m pip install ninja
if [ "Windows_NT" = "$OS" ]; then
  vcvars="$(vswhere -latest -property installationPath | tr '\\' '/' | dos2unix.exe)/VC/Auxiliary/Build/"
  echo "call \"$vcvars/vcvarsall.bat\" amd64" > msvc.bat
  for i in "${compile_env[@]}"; do
    echo "set $i" >> msvc.bat
  done
  echo "ninja install-core" >> msvc.bat
  cmd /C msvc.bat
else
  eval ${compile_env} ninja install-core
fi