Commit f650a391 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4258 from CocoaPods/seg-embedded-content-contains-swift

[AggregateXCConfig] Set EMBEDDED_CONTENT_CONTAINS_SWIFT when using a …
parents dc14b95a 7f8ce3c8
...@@ -6,6 +6,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -6,6 +6,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
## Master ## Master
##### Enhancements
* The `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting will now be set when
appropriate.
[Samuel Giddins](https://github.com/segiddins)
##### Bug Fixes ##### Bug Fixes
* Give a meaningful message for the case where there is no available stable version for a pod, * Give a meaningful message for the case where there is no available stable version for a pod,
......
...@@ -60,6 +60,9 @@ module Pod ...@@ -60,6 +60,9 @@ module Pod
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1', 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) ', 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) ',
} }
if pod_targets.any?(&:uses_swift?)
config['EMBEDDED_CONTENT_CONTAINS_SWIFT'] = 'YES'
end
@xcconfig = Xcodeproj::Config.new(config) @xcconfig = Xcodeproj::Config.new(config)
@xcconfig.merge!(merged_user_target_xcconfigs) @xcconfig.merge!(merged_user_target_xcconfigs)
......
Subproject commit b5177d3ef2ee0dcc7fdab26f7dcfb9486f2207f1 Subproject commit 25e174cdb2644097f47ce19ba3566feca113e527
...@@ -225,6 +225,16 @@ module Pod ...@@ -225,6 +225,16 @@ module Pod
it 'adds the COCOAPODS macro definition' do it 'adds the COCOAPODS macro definition' do
@xcconfig.to_hash['OTHER_SWIFT_FLAGS'].should.include '$(inherited) "-D" "COCOAPODS"' @xcconfig.to_hash['OTHER_SWIFT_FLAGS'].should.include '$(inherited) "-D" "COCOAPODS"'
end end
it 'sets EMBEDDED_CONTENT_CONTAINS_SWIFT when there is swift' do
@generator.send(:pod_targets).first.stubs(:uses_swift?).returns(true)
@generator.generate.to_hash['EMBEDDED_CONTENT_CONTAINS_SWIFT'].should == 'YES'
end
it 'does not set EMBEDDED_CONTENT_CONTAINS_SWIFT when there is no swift' do
@generator.send(:pod_targets).each { |pt| pt.stubs(:uses_swift?).returns(false) }
@generator.generate.to_hash['EMBEDDED_CONTENT_CONTAINS_SWIFT'].should.be.nil
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