|
61 | 61 | # Xcode;
|
62 | 62 | # * tools -- tools (other than the compiler) useful for developers writing
|
63 | 63 | # Swift code.
|
| 64 | +# * toolchain-tools -- a subset of tools that we will install to the OSS toolchain. |
64 | 65 | # * testsuite-tools -- extra tools required to run the Swift testsuite.
|
65 | 66 | # * toolchain-dev-tools -- install development tools useful in a shared toolchain
|
66 | 67 | # * dev -- headers and libraries required to use Swift compiler as a library.
|
67 | 68 | set(_SWIFT_DEFINED_COMPONENTS
|
68 |
| - "autolink-driver;compiler;clang-builtin-headers;clang-resource-dir-symlink;clang-builtin-headers-in-clang-resource-dir;stdlib;stdlib-experimental;sdk-overlay;parser-lib;editor-integration;tools;testsuite-tools;toolchain-dev-tools;dev;license;sourcekit-xpc-service;sourcekit-inproc;swift-remote-mirror;swift-remote-mirror-headers") |
| 69 | + "autolink-driver;compiler;clang-builtin-headers;clang-resource-dir-symlink;clang-builtin-headers-in-clang-resource-dir;stdlib;stdlib-experimental;sdk-overlay;parser-lib;editor-integration;tools;testsuite-tools;toolchain-tools;toolchain-dev-tools;dev;license;sourcekit-xpc-service;sourcekit-inproc;swift-remote-mirror;swift-remote-mirror-headers") |
69 | 70 |
|
70 | 71 | # The default install components include all of the defined components, except
|
71 | 72 | # for the following exceptions.
|
@@ -143,6 +144,24 @@ function(swift_install_in_component component)
|
143 | 144 | install(${ARGN})
|
144 | 145 | endfunction()
|
145 | 146 |
|
| 147 | +# swift_install_in_either_component(<COMPONENT1 NAME> <COMPONENT2 NAME> |
| 148 | +# <same parameters as install()>) |
| 149 | +# |
| 150 | +# Executes the specified installation actions if either one of the named |
| 151 | +# components is requested to be installed. |
| 152 | +# |
| 153 | +# This function accepts the same parameters as install(). |
| 154 | +function(swift_install_in_either_component comp1 comp2) |
| 155 | + foreach(component ${comp1} ${comp2}) |
| 156 | + precondition(component MESSAGE "Component name is required") |
| 157 | + swift_is_installing_component("${component}" is_installing) |
| 158 | + if(is_installing) |
| 159 | + install(${ARGN}) |
| 160 | + return() |
| 161 | + endif() |
| 162 | + endforeach(component) |
| 163 | +endfunction() |
| 164 | + |
146 | 165 | function(swift_install_symlink_component component)
|
147 | 166 | cmake_parse_arguments(
|
148 | 167 | ARG # prefix
|
|
0 commit comments