Commit 7212de81 authored by Paul Beusterien's avatar Paul Beusterien

Fix modular header access to header_dirs

parent 5cffb44f
...@@ -13,6 +13,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -13,6 +13,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes ##### Bug Fixes
* Fix modular header access to header_dir's.
[Paul Beusterien](https://github.com/paulb777)
[#7597](https://github.com/CocoaPods/CocoaPods/issues/7597)
* Inhibit warnings for all dependencies during validation except for the one being validated * Inhibit warnings for all dependencies during validation except for the one being validated
[Dimitris Koutsogiorgas](https://github.com/dnkoutso) [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7434](https://github.com/CocoaPods/CocoaPods/issues/7434) [#7434](https://github.com/CocoaPods/CocoaPods/issues/7434)
......
...@@ -600,7 +600,11 @@ module Pod ...@@ -600,7 +600,11 @@ module Pod
dependent_targets = recursive_dependent_targets dependent_targets = recursive_dependent_targets
dependent_targets += recursive_test_dependent_targets if include_test_dependent_targets dependent_targets += recursive_test_dependent_targets if include_test_dependent_targets
dependent_targets.each do |dependent_target| dependent_targets.each do |dependent_target|
header_search_paths.concat(sandbox.public_headers.search_paths(platform, dependent_target.pod_name, defines_module? && dependent_target.uses_modular_headers?(false))) header_search_paths.concat(sandbox.public_headers.search_paths(platform,
dependent_target.pod_name,
defines_module? &&
dependent_target.uses_modular_headers?(false) &&
dependent_target.spec_consumers.none?(&:header_dir)))
end end
header_search_paths.uniq header_search_paths.uniq
end end
......
...@@ -326,6 +326,23 @@ module Pod ...@@ -326,6 +326,23 @@ module Pod
] ]
end end
it 'returns the correct header search paths for dependent targets with header_dir set' do
@pod_target.build_headers.add_search_path('BananaLib', Platform.ios)
@pod_target.sandbox.public_headers.add_search_path('BananaLib', Platform.ios)
@pod_target.sandbox.public_headers.add_search_path('monkey', Platform.ios)
@monkey_pod_target = fixture_pod_target('monkey/monkey.podspec')
@monkey_pod_target.stubs(:platform).returns(Platform.ios)
@pod_target.stubs(:dependent_targets).returns([@monkey_pod_target])
@file_accessor = @monkey_pod_target.file_accessors.first
@file_accessor.spec_consumer.stubs(:header_dir).returns('Sub_dir')
header_search_paths = @pod_target.header_search_paths
header_search_paths.sort.should == [
'${PODS_ROOT}/Headers/Private/BananaLib',
'${PODS_ROOT}/Headers/Public',
'${PODS_ROOT}/Headers/Public/monkey',
]
end
it 'returns the correct header search paths recursively for dependent targets excluding platform' do it 'returns the correct header search paths recursively for dependent targets excluding platform' do
@pod_target.build_headers.add_search_path('BananaLib', Platform.ios) @pod_target.build_headers.add_search_path('BananaLib', Platform.ios)
@pod_target.sandbox.public_headers.add_search_path('BananaLib', Platform.ios) @pod_target.sandbox.public_headers.add_search_path('BananaLib', Platform.ios)
......
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