Commit 68b1552f authored by Paul Beusterien's avatar Paul Beusterien

Address review feedback

parent 7212de81
...@@ -600,11 +600,7 @@ module Pod ...@@ -600,11 +600,7 @@ 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, header_search_paths.concat(sandbox.public_headers.search_paths(platform, dependent_target.pod_name, defines_module? && dependent_target.uses_modular_headers?(false)))
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
...@@ -616,14 +612,14 @@ module Pod ...@@ -616,14 +612,14 @@ module Pod
# @param [Boolean] only_if_defines_modules # @param [Boolean] only_if_defines_modules
# whether the use of modular headers should require the target to define a module # whether the use of modular headers should require the target to define a module
# #
# @note This must return false when a pod has a `header_mappings_dir`, # @note This must return false when a pod has a `header_mappings_dir` or `header_dir`,
# as that allows the spec to completely customize the header structure, and # as that allows the spec to customize the header structure, and
# therefore it might not be expecting the module name to be prepended # therefore it might not be expecting the module name to be prepended
# to imports at all. # to imports at all.
# #
def uses_modular_headers?(only_if_defines_modules = true) def uses_modular_headers?(only_if_defines_modules = true)
return false if only_if_defines_modules && !defines_module? return false if only_if_defines_modules && !defines_module?
spec_consumers.none?(&:header_mappings_dir) spec_consumers.none?(&:header_mappings_dir) && spec_consumers.none?(&:header_dir)
end end
private private
......
...@@ -326,7 +326,7 @@ module Pod ...@@ -326,7 +326,7 @@ module Pod
] ]
end end
it 'returns the correct header search paths for dependent targets with header_dir set' do it 'returns header search path including header_dir from dependent' 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)
@pod_target.sandbox.public_headers.add_search_path('monkey', Platform.ios) @pod_target.sandbox.public_headers.add_search_path('monkey', 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