Skip to content

Commit

Permalink
CMake bot script
Browse files Browse the repository at this point in the history
 - Add CMake v3.3.1 (latest) to DEPS.
 - Add cmake/bot-cmake.sh to bootstrap CMake then build Skia using that.

Works on my Mac and Linux box, both with no system CMake installation.

CMake will be ~100M on disk.  The first bootstrap takes a couple minutes,
and a no-op re-run of bot-cmake.sh takes 15-20 seconds.  I thought about
having bot-cmake.sh fetch CMake instead of DEPS, but I'm not sure I can
handle updates, etc. as robustly as it can.

This will only work on Linux and Mac.  CMake requires an older CMake on
Windows.  It doesn't have an equivalent ./bootstrap there.  Will have to
think about how Windows bots will work!

BUG=skia:4269

Review URL: https://codereview.chromium.org/1339603003
  • Loading branch information
mtklein authored and Commit bot committed Sep 14, 2015
1 parent 3a100d3 commit a22eabe
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ deps = {
# - can use use our existing t_p/e/libjpeg instead of pulling it for Android?

"third_party/externals/angle2" : "https://chromium.googlesource.com/angle/angle.git@f9ac8fea307532e31cba6240801b4a56483591f8",
"third_party/externals/cmake" : "https://cmake.googlesource.com/[email protected]",
"third_party/externals/freetype": "https://skia.googlesource.com/third_party/freetype2.git@VER-2-5-0-1",
"third_party/externals/gyp" : "https://chromium.googlesource.com/external/gyp.git@08429da7955a98ef764fafa223dd7de73f654b2d",
"third_party/externals/harfbuzz": "https://skia.googlesource.com/third_party/[email protected]",
Expand Down
26 changes: 26 additions & 0 deletions cmake/cmake_build
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
# 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=`dirname $0`
cores=32

echo "Bootstrapping CMake"
pushd $here/../third_party/externals/cmake
./bootstrap --parallel=$cores
make -j $cores
popd

echo "Building with bootstrapped CMake"
pushd $here
../third_party/externals/cmake/bin/cmake . -G Ninja
ninja skia # The default also builds `example`, which I'm leaving a TODO for now.
popd

0 comments on commit a22eabe

Please sign in to comment.