Lines Matching full:distribution
1 # Utility functions for packaging an LLVM distribution. See the
10 # - The ${PROJECT}${distribution}_HAS_EXPORTS global property holds whether a
11 # project has any exports for a particular ${distribution} (where ${PROJECT}
31 # distribution for a target later. The distribution for ${target} is stored in
38 # denote the default (unnamed) distribution.
42 foreach(distribution ${LLVM_DISTRIBUTIONS})
43 foreach(target ${LLVM_${distribution}_DISTRIBUTION_COMPONENTS})
49 if(current_distribution AND NOT current_distribution STREQUAL distribution)
52 ${distribution} and ${current_distribution}\n"
56 set_property(GLOBAL PROPERTY LLVM_DISTRIBUTION_FOR_${target} ${distribution})
65 # Look up the distribution a particular target belongs to.
68 # scope to indicate if the target is in any distribution. If no distributions
71 # to indicate the distribution name for the target. If the target belongs to
72 # the default (unnamed) distribution, or if no distributions have been
84 get_property(distribution GLOBAL PROPERTY LLVM_DISTRIBUTION_FOR_${target})
87 if(LLVM_STRICT_DISTRIBUTIONS AND distribution AND umbrella_distribution AND
88 NOT distribution STREQUAL umbrella_distribution)
90 "Target ${target} has different distribution ${distribution} from its \
91 umbrella target's (${ARG_UMBRELLA}) distribution ${umbrella_distribution}\n"
94 if(NOT distribution)
95 set(distribution ${umbrella_distribution}) variable
99 if(distribution)
101 if(distribution STREQUAL "<DEFAULT>")
102 set(distribution "") variable
104 set(${distribution_var} "${distribution}" PARENT_SCOPE)
112 # distribution is named ${project}{distribution}Targets (except for LLVM where
113 # it's named ${project}{distribution}Exports for legacy reasons). Also set the
114 # ${PROJECT}_${DISTRIBUTION}_HAS_EXPORTS global property to mark the project as
115 # having exports for the distribution.
133 get_llvm_distribution(${target} in_distribution distribution ${ARGN})
136 set(${export_arg_var} EXPORT ${project}${distribution}${suffix} PARENT_SCOPE)
137 if(distribution)
138 string(TOUPPER "${distribution}" distribution_upper)
168 foreach(distribution ${LLVM_DISTRIBUTIONS})
169 list(APPEND includes "include(\"${prefix}${distribution}${suffix}\" OPTIONAL)")
177 # The target to install ${distribution} for a project is called
178 # ${project}-${distribution}-cmake-exports, where ${project} is the project name
179 # in lowercase and ${distribution} is the distribution name in lowercase, except
180 # for LLVM, where the target is just called ${distribution}-cmake-exports. See
203 foreach(distribution ${LLVM_DISTRIBUTIONS})
204 string(TOUPPER "${distribution}" distribution_upper)
207 string(TOLOWER "${distribution}" distribution_lower)
209 install(EXPORT ${project}${distribution}${suffix} DESTINATION "${destination}"
214 set_target_properties(${target} PROPERTIES FOLDER "${subproject_title}/Distribution")
223 # ${distribution} target builds the distribution, install-${distribution}
224 # installs it, and install-${distribution}-stripped installs a stripped version,
225 # where ${distribution} is the distribution name in lowercase, or "distribution"
226 # for the default distribution.
234 "Strict distribution errors (turn off LLVM_STRICT_DISTRIBUTIONS to bypass):\n"
244 # marker to denote the default (unnamed) distribution and fix it in the
251 foreach(distribution ${distributions})
252 if(distribution STREQUAL "<DEFAULT>")
253 set(distribution_target distribution)
257 string(TOLOWER "${distribution}" distribution_lower)
258 set(distribution_target ${distribution_lower}-distribution)
259 set(distribution_components ${LLVM_${distribution}_DISTRIBUTION_COMPONENTS})
271 FOLDER "${subproject_title}/Distribution"
275 …# Note that some distribution components may not have an actual target, but only an install-FOO ta…
286 … message(SEND_ERROR "Specified distribution component '${target}' doesn't have an install target")
295 … "Specified distribution component '${target}' doesn't have an install-stripped target."