Commit 80069e35 authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #6768 from dnkoutso/no_double_search_paths

Do not double add search paths to test xcconfig from parent
parents 3d4bb7d9 545d93a5
......@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
* Do not double add search paths to test xcconfig from parent
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#6767](https://github.com/CocoaPods/CocoaPods/pull/6767)
* Ensure product name for tests is not overridden by custom build settings
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#6766](https://github.com/CocoaPods/CocoaPods/pull/6766)
......
......@@ -69,11 +69,13 @@ module Pod
@xcconfig.merge!(file_accessor.spec_consumer.pod_target_xcconfig)
end
XCConfigHelper.add_target_specific_settings(target, @xcconfig)
@xcconfig.merge! XCConfigHelper.settings_for_dependent_targets(target, target.recursive_dependent_targets)
recursive_dependent_targets = target.recursive_dependent_targets
@xcconfig.merge! XCConfigHelper.settings_for_dependent_targets(target, recursive_dependent_targets)
if @test_xcconfig
@xcconfig.merge! XCConfigHelper.settings_for_dependent_targets(target, [target, *target.test_dependent_targets])
XCConfigHelper.generate_vendored_build_settings(nil, [target, *target.test_dependent_targets], @xcconfig)
XCConfigHelper.generate_other_ld_flags(nil, [target, *target.test_dependent_targets], @xcconfig)
test_dependent_targets = [target, *target.test_dependent_targets]
@xcconfig.merge! XCConfigHelper.settings_for_dependent_targets(target, test_dependent_targets - recursive_dependent_targets)
XCConfigHelper.generate_vendored_build_settings(nil, test_dependent_targets, @xcconfig)
XCConfigHelper.generate_other_ld_flags(nil, test_dependent_targets, @xcconfig)
XCConfigHelper.generate_ld_runpath_search_paths(target, false, true, @xcconfig)
end
@xcconfig
......
......@@ -159,6 +159,16 @@ module Pod
@coconut_pod_target.test_dependent_targets = [@banana_pod_target]
generator = PodXCConfig.new(@coconut_pod_target, true)
xcconfig = generator.generate
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should == '$(inherited) "${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig.to_hash['LIBRARY_SEARCH_PATHS'].should == '$(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BananaLib" "$PODS_CONFIGURATION_BUILD_DIR/CoconutLib" "${PODS_ROOT}/../../spec/fixtures/banana-lib"'
end
it 'adds settings for test dependent targets excluding the parents targets' do
@coconut_pod_target.dependent_targets = [@banana_pod_target]
@coconut_pod_target.test_dependent_targets = [@banana_pod_target]
generator = PodXCConfig.new(@coconut_pod_target, true)
xcconfig = generator.generate
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should == '$(inherited) "${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig.to_hash['LIBRARY_SEARCH_PATHS'].should == '$(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BananaLib" "$PODS_CONFIGURATION_BUILD_DIR/CoconutLib" "${PODS_ROOT}/../../spec/fixtures/banana-lib"'
end
......
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