Commit 12c8d1d6 authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #7044 from paulb777/skip-pch

Add support for preventing pch file generation
parents 690c7f5e a53bfd79
......@@ -8,7 +8,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements
* None.
* Add support for preventing pch file generation with the skip_pch podspec attribute
[Paul Beusterien](https://github.com/paulb777)
[#7044](https://github.com/CocoaPods/CocoaPods/pull/7044)
##### Bug Fixes
......@@ -42,7 +44,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[#6969](https://github.com/CocoaPods/CocoaPods/pull/6969)
* For source static frameworks, include frameworks from dependent targets and libraries in OTHER_LDFLAGS
[paulb777](https://github.com/paulb777)
[Paul Beusterien](https://github.com/paulb777)
[#6988](https://github.com/CocoaPods/CocoaPods/pull/6988)
##### Bug Fixes
......
......@@ -7,7 +7,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision: 811811b839932dd5aeb02dc90dfb55db89c6bedd
revision: 283ac03a69984faab02c03ad65871966f7581481
branch: master
specs:
cocoapods-core (1.4.0.beta.1)
......
......@@ -45,13 +45,21 @@ module Pod
create_build_phase_to_move_static_framework_archive
end
end
unless skip_pch?
create_prefix_header
end
create_dummy_source
end
end
private
# @return [Boolean] Whether the target should build a pch file.
#
def skip_pch?
target.specs.any? { |spec| spec.prefix_header_file.is_a?(FalseClass) }
end
# Remove the default headers folder path settings for static library pod
# targets.
#
......
......@@ -408,6 +408,27 @@ module Pod
]
end
it 'verifies keeping prefix header generation' do
@pod_target.specs.first.stubs(:prefix_header_file).returns(true)
@installer.install!
group = @project['Pods/BananaLib/Support Files']
group.children.map(&:display_name).sort.should == [
'BananaLib-Pods-SampleProject-dummy.m',
'BananaLib-Pods-SampleProject-prefix.pch',
'BananaLib-Pods-SampleProject.xcconfig',
]
end
it 'verifies disabling prefix header generation' do
@pod_target.specs.first.stubs(:prefix_header_file).returns(false)
@installer.install!
group = @project['Pods/BananaLib/Support Files']
group.children.map(&:display_name).sort.should == [
'BananaLib-Pods-SampleProject-dummy.m',
'BananaLib-Pods-SampleProject.xcconfig',
]
end
it 'adds the target for the static library to the project' do
@installer.install!
@project.targets.count.should == 1
......@@ -476,6 +497,16 @@ module Pod
]
end
it 'verifies disabling prefix header generation' do
@pod_target.specs.first.stubs(:prefix_header_file).returns(false)
@installer.install!
group = @project['Pods/BananaLib/Support Files']
group.children.map(&:display_name).sort.should == [
'BananaLib-dummy.m',
'BananaLib.xcconfig',
]
end
it 'adds the target for the static library to the project' do
@installer.install!
@project.targets.count.should == 1
......
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