Commit 1bf33827 authored by Ben Asher's avatar Ben Asher Committed by GitHub

Merge pull request #5732 from benasher44/basher_extensions_swift_xcode_8

Set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES when appropriate
parents 990cd0a9 3af7231c
......@@ -24,6 +24,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
Improved support for framework-only projects.
[benasher44](https://github.com/benasher44)
[#5733](https://github.com/CocoaPods/CocoaPods/pull/5733)
* Set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES when appropriate.
[benasher44](https://github.com/benasher44)
[#5732](https://github.com/CocoaPods/CocoaPods/pull/5732)
##### Bug Fixes
......
......@@ -70,6 +70,9 @@ module Pod
# in embedded targets.
if !target.requires_host_target? && pod_targets.any?(&:uses_swift?)
config['EMBEDDED_CONTENT_CONTAINS_SWIFT'] = 'YES'
config['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES'
else
config['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
end
@xcconfig = Xcodeproj::Config.new(config)
......
Subproject commit 63ec1d3a180f130ca7e64660293b8d41dc41cba7
Subproject commit 6efec430148b581610f82f67947f0d12ebd62ce4
......@@ -256,6 +256,22 @@ module Pod
@generator.send(:pod_targets).first.stubs(:uses_swift?).returns(true)
@generator.generate.to_hash['EMBEDDED_CONTENT_CONTAINS_SWIFT'].should.be.nil
end
it 'sets ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to YES when there is swift' do
@generator.send(:pod_targets).first.stubs(:uses_swift?).returns(true)
@generator.generate.to_hash['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'].should == 'YES'
end
it 'sets ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO when there is no swift' do
@generator.send(:pod_targets).first.stubs(:uses_swift?).returns(false)
@generator.generate.to_hash['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'].should == 'NO'
end
it 'sets ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO when there is swift, but the target is an extension' do
@target.stubs(:requires_host_target?).returns(true)
@generator.send(:pod_targets).first.stubs(:uses_swift?).returns(true)
@generator.generate.to_hash['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'].should == 'NO'
end
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