Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # Copyright 2015 Google Inc. | 2 # Copyright 2015 Google Inc. |
| 3 # | 3 # |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # Script for building with CMake on Skia build bots. | 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. | 8 # If you have CMake installed on your system, you can just use it normally. |
| 9 | 9 |
| 10 set -e | 10 set -e |
| 11 set -x | 11 set -x |
| 12 | 12 |
| 13 here=`dirname $0` | 13 fulldir() { |
| 14 cd `dirname $1` | |
| 15 echo `pwd` | |
| 16 } | |
| 17 | |
| 18 here=`fulldir $0` | |
| 14 cores=32 | 19 cores=32 |
| 15 | 20 |
| 21 type=${BUILDTYPE:-"Release"} | |
| 22 out=${SKIA_OUT:-$here} | |
|
borenet
2015/09/14 18:16:00
I think "out" is a better default.
| |
| 23 | |
| 16 echo "Bootstrapping CMake" | 24 echo "Bootstrapping CMake" |
| 17 pushd $here/../third_party/externals/cmake | 25 pushd $here/../third_party/externals/cmake |
| 18 ./bootstrap --parallel=$cores | 26 ./bootstrap --parallel=$cores |
| 19 make -j $cores | 27 make -j $cores |
| 20 popd | 28 popd |
| 21 | 29 |
| 22 echo "Building with bootstrapped CMake" | 30 echo "Building with bootstrapped CMake" |
| 23 pushd $here | 31 mkdir -p $out |
| 24 ../third_party/externals/cmake/bin/cmake . -G Ninja | 32 pushd $out |
| 33 $here/../third_party/externals/cmake/bin/cmake -DCMAKE_BUILD_TYPE=$type $here -G Ninja | |
|
borenet
2015/09/14 18:16:00
What's the second $here used for? Should it be $o
| |
| 25 ninja skia # The default also builds `example`, which I'm leaving a TODO for no w. | 34 ninja skia # The default also builds `example`, which I'm leaving a TODO for no w. |
| 26 popd | 35 popd |
| OLD | NEW |