blob: f2cb9bf1bf33a43618331337fc362462ab941d39 (
plain)
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
33
|
#!/bin/bash
# Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Script for building with CMake on Skia build bots.
# If you have CMake installed on your system, you can just use it normally.
set -e
set -x
here=$(cd `dirname $0`; echo `pwd`)
cores=32
if [[ -z "$BUILDTYPE" || -z "$SKIA_OUT" ]]; then
echo "If you're a bot, you should be setting BUILDTYPE ($BUILDTYPE) and SKIA_OUT ($SKIA_OUT)."
echo "If you're not a bot, you don't want to run this script."
exit 1
fi
echo "Bootstrapping CMake"
pushd $here/../third_party/externals/cmake
./bootstrap --parallel=$cores
make -j $cores cmake
popd
echo "Building with bootstrapped CMake"
mkdir -p $SKIA_OUT/$BUILDTYPE
pushd $SKIA_OUT/$BUILDTYPE
$here/../third_party/externals/cmake/bin/cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE $here -G Ninja
ninja
popd
|