Commit 637e2166 authored by Ben Asher's avatar Ben Asher

Set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES

parent 990cd0a9
...@@ -70,6 +70,9 @@ module Pod ...@@ -70,6 +70,9 @@ module Pod
# in embedded targets. # in embedded targets.
if !target.requires_host_target? && pod_targets.any?(&:uses_swift?) if !target.requires_host_target? && pod_targets.any?(&:uses_swift?)
config['EMBEDDED_CONTENT_CONTAINS_SWIFT'] = 'YES' config['EMBEDDED_CONTENT_CONTAINS_SWIFT'] = 'YES'
config['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES'
else
config['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
end end
@xcconfig = Xcodeproj::Config.new(config) @xcconfig = Xcodeproj::Config.new(config)
......
...@@ -256,6 +256,22 @@ module Pod ...@@ -256,6 +256,22 @@ module Pod
@generator.send(:pod_targets).first.stubs(:uses_swift?).returns(true) @generator.send(:pod_targets).first.stubs(:uses_swift?).returns(true)
@generator.generate.to_hash['EMBEDDED_CONTENT_CONTAINS_SWIFT'].should.be.nil @generator.generate.to_hash['EMBEDDED_CONTENT_CONTAINS_SWIFT'].should.be.nil
end 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 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