Commit f99d0a48 authored by Marius Rackwitz's avatar Marius Rackwitz

[TargetInstaller] Pass the language on target creation

parent 16b4b167
...@@ -40,7 +40,8 @@ module Pod ...@@ -40,7 +40,8 @@ module Pod
name = target.label name = target.label
platform = target.platform.name platform = target.platform.name
deployment_target = target.platform.deployment_target.to_s deployment_target = target.platform.deployment_target.to_s
@native_target = project.new_target(product_type, name, platform, deployment_target) language = target.uses_swift? ? :swift : :objc
@native_target = project.new_target(product_type, name, platform, deployment_target, nil, language)
product_name = target.product_name product_name = target.product_name
product = @native_target.product_reference product = @native_target.product_reference
......
...@@ -44,5 +44,17 @@ module Pod ...@@ -44,5 +44,17 @@ module Pod
@installer.send(:native_target).resolved_build_setting('OTHER_LDFLAGS').values.uniq.should == [''] @installer.send(:native_target).resolved_build_setting('OTHER_LDFLAGS').values.uniq.should == ['']
@installer.send(:native_target).resolved_build_setting('OTHER_LIBTOOLFLAGS').values.uniq.should == [''] @installer.send(:native_target).resolved_build_setting('OTHER_LIBTOOLFLAGS').values.uniq.should == ['']
end end
it 'adds Swift-specific build settings to the build settings' do
@pod_target.stubs(:requires_frameworks?).returns(true)
@pod_target.stubs(:uses_swift?).returns(true)
@installer.send(:add_target)
@installer.send(:native_target).resolved_build_setting('SWIFT_OPTIMIZATION_LEVEL').should == {
'Release' => nil,
'Debug' => '-Onone',
'Test' => nil,
'AppStore' => nil,
}
end
end 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