Commit 58219eca authored by Marius Rackwitz's avatar Marius Rackwitz

[Refactor] Extract #generate_pod_target in Analyzer

parent 83096348
...@@ -219,7 +219,7 @@ module Pod ...@@ -219,7 +219,7 @@ module Pod
end end
end end
generate_pod_targets(target, specs) target.pod_targets = generate_pod_targets(target, specs)
target target
end end
...@@ -240,20 +240,33 @@ module Pod ...@@ -240,20 +240,33 @@ module Pod
specs.select { |s| s.root == spec.root } specs.select { |s| s.root == spec.root }
end.uniq end.uniq
# Create a target for each spec group and add it to the aggregate target grouped_specs.map do |pod_specs|
grouped_specs.each do |pod_specs| generate_pod_target(target, pod_specs)
pod_target = PodTarget.new(pod_specs, target_definition, sandbox) end
pod_target.host_requires_framework |= target.host_requires_framework end
if config.integrate_targets?
pod_target.user_build_configurations = target.user_build_configurations # Create a target for each spec group and add it to the aggregate target
pod_target.archs = @archs_by_target_def[target_definition] #
else # @param [AggregateTarget] target
pod_target.user_build_configurations = {} # the aggregate target
if target_definition.platform.name == :osx #
pod_target.archs = '$(ARCHS_STANDARD_64_BIT)' # @param [Array<Specification>] specs
end # the specifications of an equal root.
#
# @return [PodTarget]
#
def generate_pod_target(target, pod_specs)
pod_target = PodTarget.new(pod_specs, target.target_definition, sandbox)
pod_target.host_requires_framework |= target.host_requires_framework
if config.integrate_targets?
pod_target.user_build_configurations = target.user_build_configurations
pod_target.archs = @archs_by_target_def[target.target_definition]
else
pod_target.user_build_configurations = {}
if target.platform.name == :osx
pod_target.archs = '$(ARCHS_STANDARD_64_BIT)'
end end
target.pod_targets << pod_target
end end
pod_target pod_target
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment