Prevent duplicated targets to be removed from the framework search paths

parent 1c6dedd1
...@@ -307,7 +307,7 @@ module Pod ...@@ -307,7 +307,7 @@ module Pod
# Filter out dependent targets that are subsets of another target. # Filter out dependent targets that are subsets of another target.
subset_targets = [] subset_targets = []
dependent_targets.combination(2) do |a, b| dependent_targets.uniq.combination(2) do |a, b|
if (a.specs - b.specs).empty? if (a.specs - b.specs).empty?
subset_targets << a subset_targets << a
elsif (b.specs - a.specs).empty? elsif (b.specs - a.specs).empty?
......
...@@ -83,6 +83,18 @@ module Pod ...@@ -83,6 +83,18 @@ module Pod
build_settings['FRAMEWORK_SEARCH_PATHS'].should == '"AB"' build_settings['FRAMEWORK_SEARCH_PATHS'].should == '"AB"'
end end
it 'adds the frameworks search paths once if there are duplicated targets' do
target = stub(
:specs => %w(A, B),
:should_build? => true,
:requires_frameworks? => true,
:configuration_build_dir => 'AB',
)
dependent_targets = [target, target]
build_settings = @sut.search_paths_for_dependent_targets(nil, dependent_targets)
build_settings['FRAMEWORK_SEARCH_PATHS'].should == '"AB"'
end
it 'adds the libraries of the xcconfig for a static framework' do it 'adds the libraries of the xcconfig for a static framework' do
spec = stub('spec', :test_specification? => false) spec = stub('spec', :test_specification? => false)
target_definition = stub('target_definition', :inheritance => 'search_paths') target_definition = stub('target_definition', :inheritance => 'search_paths')
......
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