skia2/tools/fiddle/make_all_examples_cpp.py
Hal Canary d61446666e Examples: compile faster
17m42.185s --> 0m10.665s

Change-Id: I2de9ddf9860f680e64e7c333e2e90755b050cf91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204541
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-04-04 15:43:59 +00:00

16 lines
651 B
Python
Executable File

#! /usr/bin/env python
# Copyright 2019 Google LLC.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
''' Run this script to re-generate the `all_examples.cpp` file after adding or
deleting example fiddles. '''
import glob
import os
os.chdir(os.path.dirname(__file__))
with open('all_examples.cpp', 'w') as o:
o.write('// Copyright 2019 Google LLC.\n// Use of this source code is '
'governed by a BSD-style license that can be found in the '
'LICENSE file.\n')
for path in sorted(glob.glob('../../docs/examples/*.cpp')):
o.write('#include "%s"\n' % path)