blob: 861453e434aedd2b8f89050a02b106dcc0a0e140 [file] [log] [blame]
Mike Klein5d2be0d2015-09-15 08:29:02 -04001#!/bin/bash
mtkleina22eabe2015-09-14 10:02:50 -07002# Copyright 2015 Google Inc.
3#
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7# Script for building with CMake on Skia build bots.
8# If you have CMake installed on your system, you can just use it normally.
9
10set -e
11set -x
12
mtkleinde5973b2015-09-15 10:17:08 -070013here=$(cd `dirname $0`; echo `pwd`)
mtkleina22eabe2015-09-14 10:02:50 -070014cores=32
15
mtklein0faed582015-09-14 12:02:32 -070016if [[ -z "$BUILDTYPE" || -z "$SKIA_OUT" ]]; then
17 echo "If you're a bot, you should be setting BUILDTYPE ($BUILDTYPE) and SKIA_OUT ($SKIA_OUT)."
18 echo "If you're not a bot, you don't want to run this script."
19 exit 1
20fi
21
mtkleina22eabe2015-09-14 10:02:50 -070022echo "Bootstrapping CMake"
23pushd $here/../third_party/externals/cmake
24./bootstrap --parallel=$cores
mtkleinde5973b2015-09-15 10:17:08 -070025make -j $cores cmake
mtkleina22eabe2015-09-14 10:02:50 -070026popd
27
28echo "Building with bootstrapped CMake"
mtklein0faed582015-09-14 12:02:32 -070029mkdir -p $SKIA_OUT
30pushd $SKIA_OUT
31$here/../third_party/externals/cmake/bin/cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE $here -G Ninja
mtklein935121b2015-09-15 06:07:47 -070032ninja
mtkleina22eabe2015-09-14 10:02:50 -070033popd