Overlays: The dependencies right now are approximate, and when new overlays are

added the build breaks. There's already a tool to get proper
dependencies, `utils/find-overlay-dependencies.sh`, so this patch
allows that tool to update the `CMakeLists.txt` files in-place.

Also it adds a line to the `CMakeLists.txt` files for each SDK so that the tool works.
This commit is contained in:
Doug Coleman
2016-09-26 08:32:58 -07:00
parent cb15745b9c
commit 6c6f30b6af
24 changed files with 131 additions and 54 deletions

View File

@@ -0,0 +1,33 @@
#!/bin/bash
#===--- find-overlay-dependencies-loop.sh - driver for find-overlay-dependency.sh---===#
#
## This source file is part of the Swift.org open source project
##
## Copyright (c) 2016 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0 with Runtime Library Exception
##
## See http://swift.org/LICENSE.txt for license information
## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
#===------------------------------------------------------------------------===#
SCRIPT="$(dirname "$0")/find-overlay-dependencies.sh"
# `update` edits the cmake file in-place; `print` just prints to console
function usage() {
echo 'usage:' $0 'update|print' >&2
exit 1
}
case $# in
1) if [[ $1 != 'update' && $1 != 'print' ]]; then
usage
fi ;;
*)
usage ;;
esac
# Don't update XCTest
for overlay in $(find ./stdlib/public/SDK/ -depth 1 -type d ! -name XCTest -exec basename \{\} \;); do
$SCRIPT $overlay $1
done